Skip to content

Commit

Permalink
[selectors-5] Add custom state pseudo-classes (#8213)
Browse files Browse the repository at this point in the history
We resolved to add the custom state pseudo-classes to selectors 5 here:
#4805

Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
  • Loading branch information
josepharhar and keithamus authored Aug 13, 2024
1 parent fc66fa1 commit 4ee0078
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions selectors-4/deferred-for-level-5
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,14 @@ The local link pseudo-class '':local-link''</h3>
What about if the document url has less than N segments,
and the link is same-page?
Should "null segments" count as matching, or not?

<h3 id="custom-state">Exposing custom state: the '':state()'' pseudo-class</h3>

The <dfn selector>:state()</dfn> pseudo-class takes a case-sensitive argument
and matches custom elements whose exposed custom states include the argument.

The grammar of the '':state()'' pseudo-class is:

<pre class=prod>:state( <ident> )</pre>

The exact matching behavior of '':state()'' pseudo-class is defined by the host language. See <a href="https://html.spec.whatwg.org/multipage/custom-elements.html#custom-state-pseudo-class">HTML's definition</a>.

0 comments on commit 4ee0078

Please sign in to comment.