Please, Please Don’t Use “CSS in JS”
Alex Sharp
24122

I also think you might be ignoring some important factors — mainly the problem of CSS maintenance.

I think a lot of people could relate to this quote from a fairly recent css-tricks article about the whole modular css movement

CSS grows over time. Smart people on great teams cede to the fact that they are afraid of their own CSS. You can’t just delete things as it’s so hard to know if it’s absolutely safe to do that. So, they don’t, they only add. I’ve seen a graph charting the size of production CSS over five years show that size grow steadily, despite the company’s focus on performance.

Preprocessors definitely help (in which case you are basically using a new language, compiled with something like Ruby/Javascript anyway) but it still takes a lot of discipline to write maintainable code.

The fact that CSS is simple to learn in terms of the absence of features found in higher-level languages such as Javascript is, IMO, the main reason why it has problems with scale (again, others may disagree).

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.