3 ms·
I’ve seen this plenty of times in CSS codebases. Nesting is a write-time optimisation but a read-time hinderance. If users stick to nesting for lightweight sco
by the_other 4y ago
I’ve seen this plenty of times in CSS codebases. Nesting is a write-time optimisation but a read-time hinderance.
If users stick to nesting for lightweight scoping, things will go well. But they wont: they’ll use it to DRY every possible line and their inheritors will suffer dehydration.
- bryanrasmussen 4y agonot just read-time, but yes it is that as well, I find a class I search for this class, now I need to understand all scope in html tree and scope of the css to understand am I looking at the right one (sure you can run into situations with that as well, but in my experience nesting makes it more difficult) but it is also a source of bugs, because complicated selectors mess with css priority and the cascade then someone writes something that has side effects and blame CSS instead of their ridiculously long nesting.