Skip to content
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

Add support for CSS nesting #14

Open
wlipa opened this issue Jan 8, 2024 · 4 comments
Open

Add support for CSS nesting #14

wlipa opened this issue Jan 8, 2024 · 4 comments

Comments

@wlipa
Copy link

wlipa commented Jan 8, 2024

Native browser support for css nesting is becoming quite widespread - https://caniuse.com/css-nesting

It appears that crass ignores nested rules. Would it be possible to support the nested syntax?

@rgrove
Copy link
Owner

rgrove commented Jan 8, 2024

Definitely possible, but I haven't yet looked into how extensive the changes would need to be to the parser. Thanks for letting me know you'd find this valuable!

@rgrove rgrove changed the title nested CSS Add support for CSS nesting Jan 8, 2024
@wlipa
Copy link
Author

wlipa commented Jan 8, 2024

Thanks for the reply. I was thinking of using it to write a tool to nest / un-nest CSS.

@stoivo
Copy link
Contributor

stoivo commented May 24, 2024

If we implement the next css spec, should it replace the current or do we expect to have both? I think it can replace since it backward compatible.

@rgrove
Copy link
Owner

rgrove commented May 24, 2024

The changes to the parser itself (and its public API) will be significant, so I would release this as a new major version (e.g. 2.0.0). Users who need to continue using the older parser for some reason can stick with 1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants