web-platform-tests / web-platform-tests/interop
:host(:has(...)) support
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 524
- Forks
- 35
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 10
Description
Description
This was proposed back in 2023 and 2025 by @Westbrook. It is currently implemented in both Firefox and Safari. Only Chromium browsers remain.
:host(:has()) selector combination, allows authors to select the host element if it has a descendent in the light DOM matching a provided relative selector list.
This would be extremely beneficial.
The implementation status in Chromium is currently marked as: Development work is on hold
Specification
W3C
web-feature
No response
Test Links
https://wpt.fyi/results/css/css-shadow?label=master&label=experimental&aligned&q=host-has
Additional Signals
https://github.com/web-platform-tests/interop/issues/791 (2025)
https://github.com/web-platform-tests/interop/issues/208 (2023)
https://drafts.csswg.org/css-shadow-1/#host-selector
https://drafts.csswg.org/selectors-4/#relational
https://issues.chromium.org/issues/40062355
https://github.com/w3c/csswg-drafts/issues/11859
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 linked WPT results for css/css-shadow and the host-has query, then read the CSS Shadow DOM and Selectors specifications. Review Chromium issue 40062355 and the linked CSSWG and Interop issues for current implementation status. Done means Chromium supports :host(:has(...)) and the relevant web-platform tests pass.
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
- 30/100