5 ms·
Do we really need this? I find all the examples harder to read and understand than combining classes/elements.
by martin_a 4y ago
Do we really need this?
I find all the examples harder to read and understand than combining classes/elements.
- spoils19 4y agoNesting is a solution in search of a problem. Combining classes has worked fantastically for me over the last 15 years.
- gedy 4y agoI don't mind it myself, but a large chunk of devs really don't get it, and they do better with nesting
- culi 4y agothat's great, but sometimes when I start vanilla side projects I like to take a CSS Zen Garden approach to things. That's harder to do the more tightly you couple your HTML and your CSS
- martin_a 4y ago> That's harder to do the more tightly you couple your HTML and your CSS That's probably why you shouldn't do that... ;-)
- adamwathan 4y agoThe stylesheets for CSS Zen Garden examples are more tightly coupled to the HTML than any other CSS I've ever seen in my life. They literally have no use against any other block of HTML than that one page.
- culi 4y agohmmmm. u right Well still I shouldn't have to decorate my html for css to something I feel is pretty reasonable to expect it to support
- jjcm 4y agoFor me it's the opposite. I find the nesting far easier to parse, especially when deeply nested. One thing to consider is what the average dev uses - looking at the 2021 state of css ( https://2021.stateofcss.com/en-US/technologies/pre-post-processors https://2021.stateofcss.com/en-US/technologies/pre-post-proc... ), SASS was used by 90% of responders, and of those 84% of them were satisfied with it. There's a strong argument to be made that nesting is the standard way to write CSS these days (at least among the demographic that responded).