Moonchild wrote: ↑2025-05-19, 10:13
Basically asking us to natively parse SCSS when parsers for that already exist? Why?
Well, with the inclusion of "nesting selector" in the css spec we basically get 2 ways:
1) implement its support in the parser - which is impractical and requires a huge amount of work;
2) just ignore it and hope that the selector won't be used too often in the wild - and what are the chances of that?
My idea is that since this is a shorthand selector - it does not bring new functionality - instead of changing the parser, you can just add a transpilation layer.
Of course, this is
far from optimal, in some cases this approach can lead to the wrong "specificity weight" for elements, performance can suffer - but I think this is the lesser evil.
And I have not thought about
full support of scss (except for a proof of concept using an existing library). Just about the functionality of this selector.
P.S. Yes, of course, I too would prefer that developers just not drag sass syntax into vanilla css. But I doubt that will happen... There's already a draft of the “CSS Functions and Mixins Module”...