-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(core): New parser for CSS selectors #10514
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
feat(core): New parser for CSS selectors #10514
Conversation
@CatchABus is CSS what supposed to work alongside rework or is it suppose to replace it ? |
It's actually a replacement for all The functions I mentioned above are part of that module (though I've not removed them yet):
I made sure to adapt it to core without breaking existing functionality. New pseudo-classes are still missing 1 or 2 advanced features so I'm still working on them. |
@CatchABus OK makes sense! Good job |
@CatchABus some selectors to consider for testing: Note, right now we convert these to supported (albeit not exact) selectors in the Specifically, the |
This PR contains support for |
0c4c505
to
15f4df6
Compare
PR Checklist
What is the current behavior?
Right now, core css parser does not analyze CSS selectors like functional pseudo-classes.
This is one of the reasons the implementation of certain CSS features is a bit hard.
What is the new behavior?
Core will make use of css-what parser for selectors. This is a modern parser that returns a result with important details for CSS selectors. Apart from its popularity, size was also a factor for this choice.
Additions
:is()
pseudo-class:where()
pseudo-class:not()
pseudo-class~
combinatorThe following
css
module functions are no longer used: