-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Consider migrating to Sass's AST for CSS #8290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Linking to some discussion of this: #8275 (comment) |
I don't think changing the parser is appropriate at this time. The As mentioned in the container query discussion I'd also like to submit a follow up PR to bring media query support up to par as well using I think this issue can be resolved as |
This issue can be closed. Svelte |
Yup, closing. We don't want to switch to another parser for this. And as noted above, the Sass library does not seem to expose just the parse phase via its JS API. The Svelte compiler also outputs its AST of the component, which includes the styles, so any change to a different format there would also be a breaking change. |
Describe the problem
css-tree
currently is lagging behind in support for key CSS features, like container queries and is not spec compliant in other semi-common corner cases (likecalc
in @at-rules). It may be worth considering an alternative CSS ASTDescribe the proposed solution
Sass provides an AST, with Sass itself having a stellar track record of ensuring full CSS compatibility, is very well maintained, has a history of being very well maintained, and (in the general case) can reproduce 1:1 any valid input CSS without modification (meaning it shouldn't affect any current valid CSS that would hit its path). It would be interesting to consider migrating Svelte's current CSS parsing needs to Sass's AST.
Alternatives considered
Soft-forking css-tree (like is happening in the linked PR), hard-forking css-tree to add the required features and functionality, looking into other CSS utilities, or doing nothing, although none of the other solutions appears to offer the same broad CSS language support as Sass does.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: