Skip to content

Commit 4ee0078

Browse files
[selectors-5] Add custom state pseudo-classes (#8213)
We resolved to add the custom state pseudo-classes to selectors 5 here: #4805 Co-authored-by: Keith Cirkel <[email protected]>
1 parent fc66fa1 commit 4ee0078

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

selectors-4/deferred-for-level-5

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,14 @@ The local link pseudo-class '':local-link''</h3>
127127
What about if the document url has less than N segments,
128128
and the link is same-page?
129129
Should "null segments" count as matching, or not?
130+
131+
<h3 id="custom-state">Exposing custom state: the '':state()'' pseudo-class</h3>
132+
133+
The <dfn selector>:state()</dfn> pseudo-class takes a case-sensitive argument
134+
and matches custom elements whose exposed custom states include the argument.
135+
136+
The grammar of the '':state()'' pseudo-class is:
137+
138+
<pre class=prod>:state( <ident> )</pre>
139+
140+
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 commit comments

Comments
 (0)