@@ -2481,6 +2481,29 @@ Sound State: the '':muted'' and '':volume-locked'' pseudo-classes</h3>
24812481<h2 id="display-state-pseudos">
24822482Element Display State Pseudo-classes</h2>
24832483
2484+ <h3 id="open-state">
2485+ Collapse State: the '':open'' and '':closed'' pseudo-class</h3>
2486+
2487+ The <dfn>:open</dfn> pseudo-class represents an element
2488+ that has both “open” and “closed” states,
2489+ and which is currently in the “open” state.
2490+
2491+ The <dfn>:closed</dfn> pseudo-class represents an element
2492+ that has both “open” and “closed” states,
2493+ and which is currently in the closed state.
2494+
2495+ Exactly what “open” and “closed” mean is host-language specific,
2496+ but exemplified by elements such as
2497+ HTML's <{details}> , <{select}> , and <{dialog}> elements,
2498+ all of which can be toggled “open” to display more content
2499+ (or any content at all, in the case of <{dialog}> ).
2500+
2501+ Note: Being “open” or “closed” is a semantic state.
2502+ An element not currently being displayed
2503+ (for example, one that has ''visibility: collapse'' ,
2504+ or belongs to a ''display: none'' subtree)
2505+ can still be “open” and will match '':open'' .
2506+
24842507<h3 id="modal-state">
24852508Modal (Exclusive Interaction) State: the '':modal'' pseudo-class</h3>
24862509
@@ -4007,6 +4030,8 @@ Changes since the 7 May 2022 Working Draft</h3>
40074030
40084031 Significant changes since the <a href="https://www.w3.org/TR/2022/WD-selectors-4-20220507/">7 May 2022 Working Draft</a> :
40094032
4033+ * Added '':open'' and '':closed'' pseudo-classes.
4034+ (<a href="https://github.com/w3c/csswg-drafts/issues/7319">Issue 7319</a> )
40104035 * Disallowed [=pseudo-elements=] from '':has()'' unless explicitly allowed
40114036 by the pseudo-element’s definition.
40124037 (<a href="https://github.com/w3c/csswg-drafts/issues/7463">Issue 7463</a> )
0 commit comments