Earlier quoted context omitted.
That so much CSS is "bad CSS" indicates that the problem isn't the craftsman so much as the tool...
Ah, I see, so when I attempt to use a hammer as a wrench I can claim the hammer is a horrible tool. CSS does exactly what it was designed to do and does it quite well. It only goes "bad" when people attempt to make it do things it wasn't designed to do. Blaming the tool for that is the sign of a bad craftsman.
CSS Modules
91–93 of 93 posts
Re: CSS Modules
#92Shadow DOM completely solves this problem in a better way by scoping styles to a shadow root. The scoping allows the browser to be smarter about style recalc as well. I do really like the idea of importing CSS into JS as a module to access the classnames and IDs though. I would like to do a similar thing with HTML imports as modules: import references to elements based on id.
Unfortunately Shadow DOM inherits CSS properties such as color;font-family.
Re: CSS Modules
#93Earlier quoted context omitted.
Ah, I see, so when I attempt to use a hammer as a wrench I can claim the hammer is a horrible tool. CSS does exactly what it was designed to do and does it quite well. It only goes "bad" when people attempt to make it do things it wasn't designed to do. Blaming the tool for that is the sign of a bad craftsman.
Exactly: CSS wasn't designed for the problems we're trying to solve. We're trying to invent the proverbial wrench.