Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,46 @@ 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>

Note: Once all of the controls that might support picker styling have it,
then we might add a (no-argument) ''::picker'' pseudo-element as well.

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 <dfn>unique picker name</dfn> of the
<a>originating element</a>. For example, the <a>unique picker name</a> for
the <{select}> element is "select".

Since it is a [=part-like pseudo-element=], 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