FYI the CSS Working Group approved a working draft of native CSS Nesting last month; it's in "stage 1."
https://drafts.csswg.org/css-nesting-1/
There's a PostCSS polyfill you can use for it today. https://github.com/jonathantneal/postcss-nesting
FYI the CSS Working Group approved a working draft of native CSS Nesting last month; it's in "stage 1."
https://drafts.csswg.org/css-nesting-1/
There's a PostCSS polyfill you can use for it today. https://github.com/jonathantneal/postcss-nesting
sadly this use case seems to be missing from the coming spec :(
> Yeah, very intentionally not allowed. It causes parsing issues, for one (you can't arbitrarily split up an ident and be guaranteed that both halves are still idents), and it's grammatically ambiguous with tagname selectors.
There's an open issue https://github.com/w3c/csswg-drafts/issues/3748 "add note explaining that BEM `&__element` class accumulation isn't supported and why"
I already have something better than CSS in 5 years when most browsers in the market get the newer CSS, so I don't see a point in following CSS now.
Better to spend time making the preprocessor more accessible to developers.