|
|
|
|
|
by TiredGuy
2286 days ago
|
|
Separation of html and css can still be a useful paradigm and does not have to be incompatible with separating your code into components. For medium-sized projects, I have found it useful to have general (or "base" and "cosmetic" a la MCSS) styling in a central place with all my variables. For my components, I strive to balance the "structure-" and "container-" -like (similar to OOCS) styling they need while not trying to make them so general that they are over-engineered. To that end, I am comfortable enough using the central variables within my components and even some central classes, recognizing that when I do want to re-use my components across projects there is occasionally ad-hoc refactoring/customization. Also, Css in JS is only one way of building components. You can keep your component-specific css separate from the rest without using JS. |
|