News for hackers. Stuff that matters.
Re:Show HN: Laptop.css by _bxg1 on Thursday September 12, 2019 @03:16PM (#20955251)
It's certainly not bad practice from a semantic/structural perspective. Contextual selectors become absolutely essential the moment your DOM becomes at all modular.

That said, there are things like BEM (http://getbem.com/naming/) which have popped up to try and maintain that general pattern while trimming down the performance cost. I'm just not sure what that cost actually looks like, impact-wise.

Re:Show HN: Laptop.css by jolmg on Thursday September 12, 2019 @03:37PM (#20955502)
I don't mean that structure in selectors should never be expressed, but I do think that selector complexity should be avoided. Nesting seems to encourage selectors of arbitrary depth, while having them always start with no context seems to discourage making them too deep.

In any case, I found this Editor's Draft[1]. I don't know what the current plans are for it, though.

[1] https://tabatkins.github.io/specs/css-nesting/