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 part parser tests #43099

Closed

Conversation

keithamus
Copy link
Contributor

@keithamus keithamus commented Nov 12, 2023

I realised there are some inconsistencies between the browsers when it comes to parsing ::part() pseudo selectors.

(See also WICG/webcomponents#934)

/cc @emilio @nt1m @tabatkins because I'd really like some additional scrutiny here. I believe all of these should be valid/invalid selectors, but given browser support is mixed I'm not 100% confident.

test_valid_selector("::part(foo):after");
test_valid_selector("::part(foo)::after");
test_valid_selector("::part(foo)::selection");
test_valid_selector("::part(foo)::first-letter");
Copy link
Contributor

Choose a reason for hiding this comment

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

first-letter is not tree-abiding right? If so it should be invalid

"::part(foo):is(:hover, :focus):not(:focus-within)::first-letter",
);
test_valid_selector("::part(foo):lang(en)");
test_valid_selector("::part(foo):dir(rtl)");
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this should be valid either... Lang/dir aren't user-action pseudo classes. but I need to check (tomorrow) what the spec ended up saying

@keithamus
Copy link
Contributor Author

Closing this as this work ended up being done via #43490 instead.

@keithamus keithamus closed this Dec 22, 2023
@keithamus keithamus deleted the add-part-parser-tests branch December 22, 2023 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants