This is a stretch wish-list item, but I think it's worth asking; there doesn't appear to be an open-source CSS AST that's as good at dealing with CSS as Sass is. css-tree, for instance (and most others, I'm told) appear to fail on things like calc in media queries and may not support things like container queries at all. Tools that then rely on these ASTs, like minification tools, analysis tools, and the like, all have the trickle-down effect of inheriting those shortcomings.
In no small part due to Sass's excellent stewardship, Sass seems to be one of the only OSS tools out there fully capable of dealing with the scope of CSS. I think it would be of great benefit to the wider web community if the AST Sass uses internally were available as a stand-alone package for other tools to pick up.
When I've brought this upn in the past (working on sass-lint), I was told the AST wan't granular enough for things like analysis; if that's still true, maybe the AST could have a "fast path" for compiling and a "slow path" for analysis? Unfortunately I don't know the internals enough to make a good suggestion here.
Anyway, thanks (as always) for your fabulous work on Sass and hope this can lead to another fabulous tool from the Sass team!
This is a stretch wish-list item, but I think it's worth asking; there doesn't appear to be an open-source CSS AST that's as good at dealing with CSS as Sass is. css-tree, for instance (and most others, I'm told) appear to fail on things like
calc
in media queries and may not support things like container queries at all. Tools that then rely on these ASTs, like minification tools, analysis tools, and the like, all have the trickle-down effect of inheriting those shortcomings.In no small part due to Sass's excellent stewardship, Sass seems to be one of the only OSS tools out there fully capable of dealing with the scope of CSS. I think it would be of great benefit to the wider web community if the AST Sass uses internally were available as a stand-alone package for other tools to pick up.
When I've brought this upn in the past (working on sass-lint), I was told the AST wan't granular enough for things like analysis; if that's still true, maybe the AST could have a "fast path" for compiling and a "slow path" for analysis? Unfortunately I don't know the internals enough to make a good suggestion here.
Anyway, thanks (as always) for your fabulous work on Sass and hope this can lead to another fabulous tool from the Sass team!