Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the :open pseudo-class #10126

Merged
merged 17 commits into from
Dec 10, 2024
Merged
37 changes: 37 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -74232,6 +74232,43 @@ Demos:
<dd><p>The <code data-x="selector-volume-locked">:volume-locked</code> <span>pseudo-class</span>
must match all <span data-x="media element">media elements</span> when the user agent's
<span>volume locked</span> is true.</p></dd>

<dt><dfn selector><code data-x="selector-open">:open</code></dfn></dt>
<dd>
<p>An <code>Element</code> matches the <code data-x="selector-open">:open</code>
<span>pseudo-class</span> if it matches one of the following:</p>
josepharhar marked this conversation as resolved.
Show resolved Hide resolved

<ol>
<li><p>A <code>details</code> element which has the <code
data-x="attr-details-open">open</code> attribute.</p></li>

<li><p>A <code>dialog</code> element which has the <code data-x="attr-dialog-open">open</code>
attribute.</p></li>

<li><p>A <code>select</code> element which is a <span>drop-down box</span> whose drop-down box
josepharhar marked this conversation as resolved.
Show resolved Hide resolved
is open.</p></li>
josepharhar marked this conversation as resolved.
Show resolved Hide resolved
</ol>
</dd>

<dt><dfn selector><code data-x="selector-closed">:closed</code></dfn></dt>
<dd>
<p>An <code>Element</code> matches the <code data-x="selector-closed">:closed</code>
josepharhar marked this conversation as resolved.
Show resolved Hide resolved
<span>pseudo-class</span> if it matches one of the following:</p>

<p>An <code>Element</code> <var>element</var> <dfn>matches the closed selector</dfn> that matches
one of the following:</p>

<ol>
<li><p>A <code>details</code> element which does not have the <code
data-x="attr-details-open">open</code> attribute.</p></li>

josepharhar marked this conversation as resolved.
Show resolved Hide resolved
<li><p>A <code>dialog</code> element which does not have the <code
data-x="attr-dialog-open">open</code> attribute.</p></li>

<li><p>A <code>select</code> element which is a <span>drop-down box</span> whose drop-down box
is closed.</p></li>
</ol>
</dd>
</dl>

<p class="note">This specification does not define when an element matches the <code undefined
josepharhar marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading