Skip to content

Conversation

@ryelle
Copy link
Collaborator

@ryelle ryelle commented Jul 1, 2025

When this project was first written, comma-separated values for pseudo classes (:not, :where, etc) were not widely supported. The expectation that commas would only separate top-level selectors was creating a syntax error when they were nested, as the tool tried to check the specificty of an interrupted selector, for example div:is(.class.

This PR updates the parsing to use csstree for selector list parsing, preventing the need to manually split a selector. Additionally, I've added tests and support for specificity values of :not, :where, :is selectors.

@ryelle ryelle self-assigned this Jul 1, 2025
@ryelle ryelle merged commit e5fb7da into trunk Jul 1, 2025
2 checks passed
@ryelle ryelle deleted the fix/modern-css-selectors branch July 1, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants