Intent to Prototype: :has-slotted pseudo selector.

107 views
Skip to first unread message

Keith Cirkel

unread,
Sep 30, 2024, 7:45:12 AMSep 30
to blin...@chromium.org

Contact emails


Explainer


Specification


Summary

The :has-slotted pseudo-class matches slot elements which have a non-empty list of slotted nodes.

Blink component


Motivation

It's common to want to style slot elements based on whether or not the default slotted content is rendered. Currently this requires scripting to check. :has-slotted makes it possible to do this in CSS alone.


Initial public proposal


TAG review

None

TAG review status

Pending

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Web developers: Positive

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Is this feature fully tested by web-platform-tests?

No

Flag name on chrome://flags

Experimental Web Platform Features

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

Reply all
Reply to author
Forward
0 new messages