Skip to content

Commit

Permalink
Define ::picker()
Browse files Browse the repository at this point in the history
This was discussed here: w3c#10440
  • Loading branch information
josepharhar committed Sep 10, 2024
1 parent aa94f65 commit 7c3fe1e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,43 @@ details[open]::details-content {
}</pre>
</div>

<h3 id="picker-pseudo">
Styling form control pickers: the ''::picker()'' pseudo-element</h3>

The <dfn>::picker()</dfn> pseudo-element targets the popup picker of form
control elements which have popup pickers, such as the <{select}> element. It
is a [=part-like pseudo-element=].

<pre class=prod>
::picker() == ::picker( <<ident>>+ )
</pre>

The ''::picker()'' pseudo-element only matches when the <a>originating
element</a> supports <a>base appearance</a> and has a popup picker. The
specified <<ident>> must also match the unique picker name of the
<a>originating element</a>. For example, the unique picker name for the
<{select}> element is "select".

There is no restriction on which properties apply to the ''::picker()''
pseudo-element.

In order for the ''::picker()'' pseudo-element to be rendered, it and its
<a>originating element</a> must be rendered with <a>base appearance</a> by
applying ''appearance: base'' to both of them.

<pre class="example">
&lt;style>
select, select::picker(select) {
appearance: base;
}
select::picker(select) {
border: 5px solid red;
background-color: blue;
}
&lt;/style>
</pre>


<h2 id="interactions">
Overlapping Pseudo-element Interactions</h2>

Expand Down

0 comments on commit 7c3fe1e

Please sign in to comment.