3 ms·
Utility classes are good, don't worry about that. Utility classes are a required part of any good CSS system. Programming with only utility classes, and patter
by stevebmark 6y ago
Utility classes are good, don't worry about that. Utility classes are a required part of any good CSS system.
Programming with only utility classes, and patterns like OOCSS and BEM are bad, and we've stopped using these for literally decades.
The more important question is how do these libraries work under the hood, which is both little understood and rarely included in analysis. Breaking out CSS files is critical, any CSS created and inserted by Javascript is unforgivable in production. Focusing on what the libraries do in production is the key. And if your tool needs some special DSL to use native CSS features like @keyframes, don't use that tool. Period.
The author is right in that CSS is 100% a solved problem, and the answer is component scoped CSS with some global utility classes (which can come from Bootstrap or wherever if you choose to use such a framework). There's nothing better, it solves every need, and doesn't come with any of the baggage of other systems.