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

servo: Add support for parsing :is() and :where() #80

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrobinson
Copy link
Member

Stylo supports these and they just need to be turned on.

Signed-off-by: Martin Robinson [email protected]

Copy link
Contributor

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We've done this in Blitz and it seems to work. My one reservation would be that I believe that "nth-child" and "has" require extra invalidation logic that is not handled by Stylo and needs to be handled externally.

(I am keen to document how that works, probably as an example in the Stylo repo, but I haven't worked it out myself yet)

@Loirooriol
Copy link
Contributor

Yeah have you confirmed that :has() really works? Because I have strong doubts.

@mrobinson
Copy link
Member Author

Yeah have you confirmed that :has() really works? Because I have strong doubts.

It's functional, but there's still work to do with invalidation, as @nicoburns mentioned above.

@Loirooriol
Copy link
Contributor

Should this be closed like servo/servo#33543 ?

@nicoburns
Copy link
Contributor

I think this should be scoped down. I believe :is() and :where() (and possibly nested selectors?) should "just work" if enabled here, whereas :has(), :nth-child() require complex integration work.

@mrobinson mrobinson force-pushed the parse-is-nth-child-of-has-and-parent branch 2 times, most recently from d9db974 to c2f7754 Compare October 29, 2024 09:56
Stylo supports these and they just need to be turned on.

Signed-off-by: Martin Robinson <[email protected]>
@mrobinson mrobinson force-pushed the parse-is-nth-child-of-has-and-parent branch from c2f7754 to 3e44b02 Compare October 30, 2024 09:10
@mrobinson mrobinson changed the title servo: Add support for parsing :is(), :has(), :where(), and nesting selectors servo: Add support for parsing :is() and :where() Oct 30, 2024
@mrobinson mrobinson marked this pull request as ready for review October 30, 2024 11: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.

3 participants