3 ms·
This debate seems out of place given that it's been belabored since CSS frameworks became a thing. But consider how CSS files easily become append-only junk dr
by hombre_fatal 7y ago
This debate seems out of place given that it's been belabored since CSS frameworks became a thing.
But consider how CSS files easily become append-only junk drawers. And you may have to scour arbitrary files just to see what CSS affects this one button on this one component on this one page. And even if you find the CSS that you think affects the html node, you have to open your browser and use inspect element to see if there's anything that cascades over it. Meanwhile, a simple class doesn't lie.
And CSS doesn't even have native mixin reusability like `.form button { @mixin button } `.
There are clearly trade-offs here. For example, it's a huge deal when modifying complex UI to see these classes inline and being able to change things in a single file without the indirection of a CSS file.
You can get a chip on your shoulder about your arbitrary views on what is right and wrong, but people clearly find these non-semantic classes useful. I've worked at a company that had very purist views on how CSS should be written where there were almost no classes in the html, and it was very hard to make large UI changes without credentializing in multiple CSS files. There is no free win.