Skip to content

Commit

Permalink
[css-pseudo-4][css-forms-1] Move ::picker() to css-forms-1 where it b…
Browse files Browse the repository at this point in the history
…elongs #10865
  • Loading branch information
fantasai committed Oct 15, 2024
1 parent 24eda7a commit 272b1fd
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 40 deletions.
45 changes: 45 additions & 0 deletions css-forms-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,51 @@ Abstract: This document is currently a loosely-structured set of ideas and inspi
Warning: not ready
</pre>

New Pseudo-Elements {#pseudos}
==============================

This section defines some pseudo-elements for styling parts of form elements.

<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 an [=element-backed 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 an [=element-backed 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>


Basic Styling Proposals {#ideas}
================================

Expand Down
40 changes: 0 additions & 40 deletions css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1683,46 +1683,6 @@ 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 an [=element-backed 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 an [=element-backed 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

0 comments on commit 272b1fd

Please sign in to comment.