3 ms·
It’s not apparent from the document posted, but this is actually almost six years old [0] and already implemented as a PostCSS plugin for just as long [1]. It w
by JimDabell 5y ago
It’s not apparent from the document posted, but this is actually almost six years old [0] and already implemented as a PostCSS plugin for just as long [1]. It was adopted by the CSS Working Group a couple of years ago [2]. So this is very well-established and you’ve been able to use this syntax for many years. But it’s good to see it moving forward and hopefully browsers will implement it soon now.
[0] https://tabatkins.github.io/specs/css-nesting/ https://tabatkins.github.io/specs/css-nesting/
[1] https://github.com/csstools/postcss-nesting https://github.com/csstools/postcss-nesting
[2] https://github.com/w3c/csswg-drafts/pull/2878 https://github.com/w3c/csswg-drafts/pull/2878
- TheRealPomax 5y agoAnd proposed a decade ago (https://lists.w3.org/Archives/Public/www-style/2011Jun/0022.html https://lists.w3.org/Archives/Public/www-style/2011Jun/0022....)
- eyelidlessness 5y agoThis is good historical context but missing one bit and another deserves clarification. The nesting semantics has been a part of SASS/SCSS for the better part of a decade before the proposal, which is now pretty much standard in CSS pre-/post-processing. It’s been available to use all that time, but AFAIK still requires a build tool. It’s only now becoming a tentative possibility in userland.
- JimDabell 5y agoYes, sorry, I was assuming knowledge of Sass etc. When I first saw this link I thought “Hang on a sec., this says ‘First Public Working Draft’, but hasn’t this spec. been around for ages?” I figured people might make the mistake that this was something new that the W3C were only just getting around to rather than something that has been cooking for a long time. Didn’t mean to imply that the spec. itself sprang up out of nowhere – it was definitely based on the Sass work that came before it, and you have been able to use this syntax with Sass for a very long time!