Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-pseudo-4] Define ::picker() #10865

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Changes from 1 commit
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
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should probably be defining the term "unique picker name" (for other specs to reference), unless you think it should be defined somewhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Do you think that HTML should define the mapping?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think HTML should define it.

<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.
dbaron marked this conversation as resolved.
Show resolved Hide resolved

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>

dbaron marked this conversation as resolved.
Show resolved Hide resolved

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

Expand Down