Skip to content

Commit b6bf511

Browse files
committed
Add new pseudo-elements for customizable select
This PR adds the ::check and ::select-icon pseudo-elements so that select elements can have a standardized and customizable dropdown icon on the button and checkmarks next to options. Fixes w3c#10908
1 parent 2fec812 commit b6bf511

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

css-pseudo-4/Overview.bs

+25-1
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,30 @@ Styling form control pickers: the ''::picker()'' pseudo-element</h3>
16341634
&lt;/style>
16351635
</pre>
16361636

1637+
<h3 id="select-arrow">
1638+
Select dropdown icon: the ''::select-arrow'' pseudo-element</h3>
1639+
1640+
The ''::select-arrow'' pseudo-element only matches when the <a>originating
1641+
element</a> is a <{select}> element. When its computed 'content' value is not
1642+
''content/none'', this pseudo-element generates a box as if it was an
1643+
immediate child of its <a>originating element</a>, with content as specified
1644+
by 'content'.
1645+
1646+
''::select-arrow'' is a [=part-like pseudo-element=], so there is no
1647+
restriction on which properties apply to the ''::select-arrow'' pseudo-element.
1648+
1649+
<h3 id="check">
1650+
Option checkmark icon: the ''::check'' pseudo-element</h3>
1651+
1652+
The '::check'' pseudo-element only matches when the <a>originating
1653+
element</a> is a <{option}> element. When its computed 'content' value is not
1654+
''content/none'', this pseudo-element generates a box as if it was an
1655+
immediate child of its <a>originating element</a>, with content as specified
1656+
by 'content'.
1657+
1658+
''::check'' is a [=part-like pseudo-element=], so there is no restriction on
1659+
which properties apply to the ''::check'' pseudo-element.
1660+
16371661

16381662
<h2 id="interactions">
16391663
Overlapping Pseudo-element Interactions</h2>
@@ -1986,4 +2010,4 @@ Acknowledgements</h2>
19862010
get-computed-style-crash.html
19872011
svg-text-selection-002.html
19882012
text-selection.html
1989-
</wpt>
2013+
</wpt>

0 commit comments

Comments
 (0)