web-platform-tests / web-platform-tests/interop

CSS :has-slotted support

Open
#1,356 1 comment 36 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

focus-area-proposal
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

Browser positions

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.