Web platform features explorer

:state()

Newly available since 2024-05-17
Tags: api css Groups: HTML > Custom elements

The :state() CSS pseudo-class matches custom elements based on their custom state, set through the ElementInternals.states API.

Learn more

Specifications

Browser support

  • 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

Usage (according to Chrome Platform Status)

~0.218% of page loads. More data at chromestatus.