:state()
Newly available since 2024-05-17
The :state()
CSS pseudo-class matches custom elements based on their custom state, set through the ElementInternals.states
API.
To learn more, see
:state() at MDN.
Compatibility
- Chrome 125 Released on 2024-05-14
- Chrome Android 125 Released on 2024-05-14
- Edge 125 Released on 2024-05-17
- Firefox 126 Released on 2024-05-14
- Firefox for Android 126 Released on 2024-05-14
- Safari 17.4 Released on 2024-03-05
- Safari on iOS 17.4 Released on 2024-03-05
Specifications
- HTML Standard (#custom-state-pseudo-class), from HTML Workstream (WHATWG).