Skip to content

Commit 5344c61

Browse files
authored
[css-pseudo-4] Define ::picker() (#10865)
This was discussed here: #10440
1 parent 9af0cb8 commit 5344c61

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

css-pseudo-4/Overview.bs

+40
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,46 @@ details[open]::details-content {
15951595
}</pre>
15961596
</div>
15971597

1598+
<h3 id="picker-pseudo">
1599+
Styling form control pickers: the ''::picker()'' pseudo-element</h3>
1600+
1601+
The <dfn>::picker()</dfn> pseudo-element targets the popup picker of form
1602+
control elements which have popup pickers, such as the <{select}> element. It
1603+
is a [=part-like pseudo-element=].
1604+
1605+
<pre class=prod>
1606+
::picker() == ::picker( <<ident>>+ )
1607+
</pre>
1608+
1609+
Note: Once all of the controls that might support picker styling have it,
1610+
then we might add a (no-argument) ''::picker'' pseudo-element as well.
1611+
1612+
The ''::picker()'' pseudo-element only matches when the <a>originating
1613+
element</a> supports <a>base appearance</a> and has a popup picker. The
1614+
specified <<ident>> must also match the <dfn>unique picker name</dfn> of the
1615+
<a>originating element</a>. For example, the <a>unique picker name</a> for
1616+
the <{select}> element is "select".
1617+
1618+
Since it is a [=part-like pseudo-element=], There is no restriction on which
1619+
properties apply to the ''::picker()'' pseudo-element.
1620+
1621+
In order for the ''::picker()'' pseudo-element to be rendered, it and its
1622+
<a>originating element</a> must be rendered with <a>base appearance</a> by
1623+
applying ''appearance: base'' to both of them.
1624+
1625+
<pre class="example">
1626+
&lt;style>
1627+
select, select::picker(select) {
1628+
appearance: base;
1629+
}
1630+
select::picker(select) {
1631+
border: 5px solid red;
1632+
background-color: blue;
1633+
}
1634+
&lt;/style>
1635+
</pre>
1636+
1637+
15981638
<h2 id="interactions">
15991639
Overlapping Pseudo-element Interactions</h2>
16001640

0 commit comments

Comments
 (0)