Newly Available
Custom elements
id: state
:state()
The
:state() CSS pseudo-class matches custom elements based on their custom state, set through the ElementInternals.states API.
Baseline Status:
Achieved Newly Available on May 17, 2024 across core engines.
Desktop Browser Engine Support
Google Chrome
125
Supported
Mozilla Firefox
126
Supported
Apple Safari
17.4
Supported
Microsoft Edge
125
Supported
Mobile Browser Engine Support
Chrome Android
125
Firefox Android
126
Safari iOS
17.4
Specifications and References
MDN Browser Compat Data Keys:
api.CustomStateSet ↗
api.CustomStateSet.@@iterator ↗
api.CustomStateSet.add ↗
api.CustomStateSet.clear ↗
api.CustomStateSet.delete ↗
api.CustomStateSet.entries ↗
api.CustomStateSet.forEach ↗
api.CustomStateSet.has ↗
api.CustomStateSet.keys ↗
api.CustomStateSet.size ↗
api.CustomStateSet.values ↗
api.ElementInternals.states ↗
css.selectors.state ↗