I
I
ilanagrk2019-12-10 17:10:59
css
ilanagrk, 2019-12-10 17:10:59

How to transfer styles?

Given: a PHP project that is several years old. All styles in two huge files. It was decided to rewrite on React. They began to rewrite, and the styles are added to the same two files.
Question: how can I more or less painlessly transfer the styles to the react repository, so that a piece of the project that cannot be broken in PHP yet, do not double the styles, etc.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
profesor08, 2019-12-10
@profesor08

They began to rewrite, and the styles are added to the same two files.

Already at this stage, something went wrong.
Once you start rewriting, well, rewrite. I think you know how to write styles for react components. If this does not fit, then I think it is known how to connect scss with styles to the project.

C
camelCaseVlad, 2019-12-10
@camelCaseVlad

Encapsulate styles with components. Don't put all the styles in a common .css file, stick to the best practices (google it, use what suits you).
Here is an example from my project at work:
5defad3c18cb0983470486.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question