Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/

[1] https://github.com/csstools/postcss-nesting

[2] https://github.com/w3c/csswg-drafts/pull/2878



This 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.


Yes, 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!





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: