4 ms·
Au contraire, global stylesheets are a mess. Good riddance.
by dcwca 9y ago
Au contraire, global stylesheets are a mess. Good riddance.
- Kequc 9y agoTheir very structure is one which is namespaced, there is no other way to format a stylesheet. Sort of like "Global code" oh woe is me, I put my new class in a namespace but it's still accessible from everywhere and can be shared to other places.
- pluma 9y agoYou know what's better than namespaces? Encapsulation. Why bother coming up with namespaces in CSS in addition to the structure of your JS if your components need both if you can simply let your tooling generate the namespaces for you? And god help you if you ever need to resolve naming conflicts when using third-party CSS. With "CSS-in-JS" you get that for free as part of the conflict resolution of your module loader.