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

Implement :has-slotted #790

Open
Westbrook opened this issue Oct 7, 2024 · 0 comments
Open

Implement :has-slotted #790

Westbrook opened this issue Oct 7, 2024 · 0 comments
Labels
focus-area-proposal Focus Area Proposal

Comments

@Westbrook
Copy link

Westbrook commented Oct 7, 2024

Description

<slot> elements can have content ::slotted(*) into them, but historically a developer could not know whether there were elements or text nodes addressed to those slots. The :has-slotted pseudo-class makes the presence of slotted content testable in the CSS context, which will end the need for a widely duplicated set of JS features.

Currently this feature is in Chrome Canary behind a flag and there was wide interest in bringing this to the web platform at various TPAC sessions in September.

Specification

https://drafts.csswg.org/css-scoping/?utm_source=recordnotfound.com#the-has-slotted-pseudo

Additional Signals

WPTs
Chrome bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
Status: No status
Development

No branches or pull requests

1 participant