Limited Availability
Selectors
:host-context()
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.
Baseline Status:
This feature is currently Limited (not yet Baseline). Latest engine implementation shipped on Jan 15, 2020.
Desktop Browser Engine Support
Google Chrome
54
Supported
Mozilla Firefox
—
Unsupported
Apple Safari
—
Unsupported
Microsoft Edge
79
Supported
Mobile Browser Engine Support
Chrome Android
54
Firefox Android
—
Safari iOS
—
Specifications and References
MDN Browser Compat Data Keys:
id: host-context