You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Reacted by Jeroen Zwartepoorte, Andrew Hudson, phantomxx29474, Martin Shelley, alexgagnon, jack, G. Luke Mendelman-Haenn, Ric Le Poidevin, Fynn Ellie Becker, Ashley (Scirra) and 11 more
This comment was automatically generated based on the information you provided. Please don't edit it.
Below is additional information about the web features (from the web-features project) which are referenced in your proposal.
If this doesn't accurately correspond to your proposal, please update your initial comment to include web-features: <feature-id>.
To find feature IDs, use the web-features explorer.
Host
Feature Host
ID: host
Name: Host
Description: The :host CSS pseudo-class selects the containing element of the shadow tree in which it is used. The :host() CSS pseudo-class selects the that element only if it matches the provided selector.
Description: The :host-context() CSS pseudo-class selects the containing element of the shadow tree in which it is used if that element or an ancestor matches the provided selector.
Description: CSS selectors match elements based on their type, attributes, and relationship to other elements. They define the specific elements to which a block of styles will be applied. This feature represents the oldest selectors of CSS.
Activity
github-actions commentedon Sep 14, 2026
This comment was automatically generated based on the information you provided. Please don't edit it.
Below is additional information about the web features (from the web-features project) which are referenced in your proposal.
If this doesn't accurately correspond to your proposal, please update your initial comment to include
web-features: <feature-id>.To find feature IDs, use the web-features explorer.
Host
Feature Host
:hostCSS pseudo-class selects the containing element of the shadow tree in which it is used. The:host()CSS pseudo-class selects the that element only if it matches the provided selector.:hostCSS pseudo-class,:host()CSS pseudo-class:host-context()
Feature :host-context()
:host-context()CSS pseudo-class selects the containing element of the shadow tree in which it is used if that element or an ancestor matches the provided selector.:host-context()CSS pseudo-class:has()
Feature :has()
:has()CSS functional pseudo-class matches an element if any of the selectors passed as parameters would match at least one element.:has()CSS pseudo-classSelectors (core)
Feature Selectors (core)