6 ms·
when I use sass nesting it's almost always to do BEM style selectors via `&-`, which really is soo much easier to read than having to type the full selector eve
by stefanfisk 7y ago
when I use sass nesting it's almost always to do BEM style selectors via `&-`, which really is soo much easier to read than having to type the full selector every time, especially when you have A LOT of components in a directory structure.
sadly this use case seems to be missing from the coming spec :(
- somefuckingguy 7y agoAgreed. This is trivial to add if you use postcss (postcss-nested)
- type0 7y agoCorrect me if i'm wrong but postcss is js or node.js only, where's sass is trivial to add with any language.
- MarvelousWololo 7y agoI'm not totally sure but I think that for Sass only you'd still need Ruby or Node.
- serial_dev 7y agoSass has LibSass which is a C++ port of the Sass engine (which was originally written in Ruby). There are wrappers available in many languages, such as Go, Java, Node, PHP (and even Ruby, interestingly enough). https://sass-lang.com/libsass https://sass-lang.com/libsass
- dfabulich 7y agohttps://github.com/w3c/csswg-drafts/issues/2701#issuecomment-395504004 https://github.com/w3c/csswg-drafts/issues/2701#issuecomment... > 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 https://github.com/w3c/csswg-drafts/issues/3748 "add note explaining that BEM `&__element` class accumulation isn't supported and why"