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

Support :host and :host-context pseudo class selectors #216

Merged
merged 2 commits into from Dec 14, 2022

Conversation

bramus
Copy link
Contributor

@bramus bramus commented Dec 12, 2022

These are defined in https://w3c.github.io/csswg-drafts/css-scoping/#host-selector

  • :host
  • :host(<compound-selector>)
  • :host-context(<compound-selector>)

With this PR, CSSTree will now parse them, instead of returning a Raw AST.

Limitations of this PR:

@coveralls
Copy link

coveralls commented Dec 12, 2022

Coverage Status

Coverage increased (+0.0002%) to 98.931% when pulling 449cc41 on bramus:host-pseudos into debb7c5 on csstree:master.

@lahmatiy
Copy link
Member

@bramus Thank you for your effort!
I commented #214 and #215, that's not a bug but a feature.
It would be nice to add a test for :host. I believe it can be parsed. However, let's be double sure it works. Everything else looks good to me.

@bramus
Copy link
Contributor Author

bramus commented Dec 14, 2022

Done.

@lahmatiy lahmatiy merged commit 49b4006 into csstree:master Dec 14, 2022
@lahmatiy
Copy link
Member

Thank you, @bramus!

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.

None yet

3 participants