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] Add new pseudo-elements for customizable select #10986

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

josepharhar
Copy link
Contributor

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 #10908

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
@josepharhar
Copy link
Contributor Author

I mostly copied the definitions from before/after. If before/after aren't actually part-like, then should I copy the text from ::backdrop that looks like this instead of saying these pseudos are part like?

The ::backdrop pseudo-element is a tree-abiding pseudo-element. It accepts all properties. It inherits from its originating element.

Copy link
Member

@dbaron dbaron left a comment

Choose a reason for hiding this comment

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

A few comments (and questions) here -- I think they apply equally to both pseudos, but I've only made them once.

restriction on which properties apply to the ''::select-arrow'' pseudo-element.

''::select-arrow'' generates a box as if it was an immediate child of its
<a>originating element</a>, preceding any boxes generated by the ''::before''
Copy link
Member

Choose a reason for hiding this comment

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

So I'm wondering if the idea that it precedes the ::before is incompatible with being part-like. I'm a little worried that it might be.


''::select-arrow'' generates a box as if it was an immediate child of its
<a>originating element</a>, preceding any boxes generated by the ''::before''
pseudo-element, with content as specified by 'content'.
Copy link
Member

Choose a reason for hiding this comment

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

I'm also worried about allowing content here when it doesn't (in reality) work on elements, which part-like pseudo-elements should fully behave like.

''::select-arrow'' is a [=part-like pseudo-element=], so there is no
restriction on which properties apply to the ''::select-arrow'' pseudo-element.

''::select-arrow'' generates a box as if it was an immediate child of its
Copy link
Member

Choose a reason for hiding this comment

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

I don't like the term "immediate child"; "child" is fine. You don't need "immediate" to differentiate "child" from "descendant".

''::select-arrow'' is a [=part-like pseudo-element=], so there is no
restriction on which properties apply to the ''::select-arrow'' pseudo-element.

''::select-arrow'' generates a box as if it was an immediate child of its
Copy link
Member

Choose a reason for hiding this comment

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

Are there conditions on when this generates a box? Does it only do something for appearance: base-select?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[css-ui] Pseudo-elements for checkmark and dropdown icon for appearance:base <select>
2 participants