Awesome to finally have nesting. The way I see it, this took 10 years longer than it should have. I feel the only big thing missing from the vanilla stack for me right now is a template element that multiple html files can share. Just like how you make a blog header in Jekyll or Hugo and it adds it on all your blog posts get the header. I haven't found an easy way of doing that if I have a bunch of html pages.
WebKit Supports Nested CSS
181–183 of 183 posts
Re: WebKit Supports Nested CSS
#182Re: WebKit Supports Nested CSS
#183Earlier quoted context omitted.
I'm saying the "&" should be required _at the start_. Perhaps controversial, I know. I realize this eliminates use cases like em { color: green; li & { color: red; } } It's okay not to support these use cases. They're confusing because they break encapsulation; the rule that appears to be nested inside (in this case, color: red) is affected by an element on the outside (in this case, ). Compare: li { color: blue; } e…
This functional limitation was eliminated from consideration long ago: it’s very common to want that functionality. There were options considered for still denoting nesting, e.g. start all nested chunks with @nest, but this was decided to be inconveniently verbose. I think & is safe from being inconveniently verbose, but you can’t sanely use that without the functional limitation. On your example: nesting is not abou…