host-context
Limited availability
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.
To learn more, see
:host-context() at MDN.
Compatibility
- Chrome 54 Released on 2016-10-12
- Chrome Android 54 Released on 2016-10-19
- Edge 79 Released on 2020-01-15
- Firefox ❌ See bugzil.la/1082060
- Firefox for Android ❌ See bugzil.la/1082060
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position