web-platform-tests / web-platform-tests/interop
CSS :has-slotted support
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 524
- Forks
- 35
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 10
Description
Description
The :has-slotted CSS pseudo-class matches <slot> elements where the fallback content is not shown. The pseudo-class matches any slotted content, including white space, text nodes, or elements.
For Interop 2027, it would be great to have the :has-slotted selector available across all engines. It has already landed in Firefox. It is being worked on in WebKit (spec clarifications are being sought) and at one point, it was also being worked on in Chromium. Having this cross-engine would remove the need for hacky JS workarounds.
Spec:
https://drafts.csswg.org/css-shadow-1/#the-has-slotted-pseudo
Specification
W3C
web-feature
https://web-platform-dx.github.io/web-features-explorer/features/has-slotted/
Test Links
https://wpt.fyi/results/css?label=master&label=experimental&aligned&q=has-slotted
Additional Signals
- https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:has-slotted
- https://groups.google.com/a/chromium.org/g/blink-dev/c/o3ja7zaKuls?pli=1
- https://github.com/w3c/csswg-drafts/issues/14307
Browser positions
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CSS Shadow DOM specification section for :has-slotted and review the linked web-features entry and WPT results query. Check the linked browser-position discussions and existing tests returned by the query; done means cross-engine support is tracked against the specification and relevant WPT coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100