:state()

baseline logo Widely available in browsers but not in WebViews

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