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.

Learning resources on MDN

Browser support

Usage (according to Chrome Platform Status)

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

Specifications