-
Notifications
You must be signed in to change notification settings - Fork 671
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-forms-1] Add new pseudo-elements for customizable select #10986
base: main
Are you sure you want to change the base?
Conversation
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
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?
|
There was a problem hiding this 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.
css-pseudo-4/Overview.bs
Outdated
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'' |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it not part like anymore. Does that resolve this?
css-pseudo-4/Overview.bs
Outdated
|
||
''::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'. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it not part like anymore. Does that resolve this?
css-pseudo-4/Overview.bs
Outdated
''::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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I added the restriction that there must be a select element with base appearance.
css-pseudo-4/Overview.bs
Outdated
The '::check'' pseudo-element only matches when the <a>originating | ||
element</a> is a <{option}> element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I commented in the chromium prototype CL, should this instead say that the pseudo-element is only generated for option elements? That's an observable difference for getComputedStyle(div, '::check')
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to say generated instead of matches
It sounds like this is ok, so I copied the text from ::backdrop to make it not part-like anymore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase this over the css-forms-1 draft. :)
Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8
Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928423 Reviewed-by: Rune Lillesveen <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Traian Captan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369011}
Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928423 Reviewed-by: Rune Lillesveen <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Traian Captan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369011}
done |
Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928423 Reviewed-by: Rune Lillesveen <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Traian Captan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369011}
This pseudo element is added to allow <option> elements inside <select> elements to have a standardized and customizable checkmark icon. Spec definition: ``` Option checkmark icon: the '::check' pseudo-element The '::check' pseudo-element is only generated when the originating element is a option element which has an ancestor select element with base appearance. '::check' is a tree-abiding pseudo-element. It accepts all properties. It inherits from its originating element. '::check' generates a box as if it was an child of its originating element, preceding any boxes generated by the '::before' pseudo-element, with content as specified by 'content'. ``` Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: Ie5058d66f90644f9732bc619a3f587b6203d1cf9
…rt, a=testonly Automatic update from web-platform-tests Add ::check pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928423 Reviewed-by: Rune Lillesveen <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Traian Captan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369011} -- wpt-commits: 181e33be283f60d28349f6828782091489684ece wpt-pr: 48625
…rt, a=testonly Automatic update from web-platform-tests Add ::check pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928423 Reviewed-by: Rune Lillesveen <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Traian Captan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369011} -- wpt-commits: 181e33be283f60d28349f6828782091489684ece wpt-pr: 48625
This pseudo element is added to allow <option> elements inside <select> elements to have a standardized and customizable checkmark icon. Spec definition: ``` Option checkmark icon: the '::check' pseudo-element The '::check' pseudo-element is only generated when the originating element is a option element which has an ancestor select element with base appearance. '::check' is a tree-abiding pseudo-element. It accepts all properties. It inherits from its originating element. '::check' generates a box as if it was an child of its originating element, preceding any boxes generated by the '::before' pseudo-element, with content as specified by 'content'. ``` Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: Ie5058d66f90644f9732bc619a3f587b6203d1cf9
This pseudo element is added to allow <option> elements inside <select> elements to have a standardized and customizable checkmark icon. Spec definition: ``` Option checkmark icon: the '::check' pseudo-element The '::check' pseudo-element is only generated when the originating element is a option element which has an ancestor select element with base appearance. '::check' is a tree-abiding pseudo-element. It accepts all properties. It inherits from its originating element. '::check' generates a box as if it was an child of its originating element, preceding any boxes generated by the '::before' pseudo-element, with content as specified by 'content'. ``` Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: Ie5058d66f90644f9732bc619a3f587b6203d1cf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925018 Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1371648}
This pseudo element is added to allow <option> elements inside <select> elements to have a standardized and customizable checkmark icon. Spec definition: ``` Option checkmark icon: the '::check' pseudo-element The '::check' pseudo-element is only generated when the originating element is a option element which has an ancestor select element with base appearance. '::check' is a tree-abiding pseudo-element. It accepts all properties. It inherits from its originating element. '::check' generates a box as if it was an child of its originating element, preceding any boxes generated by the '::before' pseudo-element, with content as specified by 'content'. ``` Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: Ie5058d66f90644f9732bc619a3f587b6203d1cf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925018 Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1371648}
This pseudo element is added to allow <option> elements inside <select> elements to have a standardized and customizable checkmark icon. Spec definition: ``` Option checkmark icon: the '::check' pseudo-element The '::check' pseudo-element is only generated when the originating element is a option element which has an ancestor select element with base appearance. '::check' is a tree-abiding pseudo-element. It accepts all properties. It inherits from its originating element. '::check' generates a box as if it was an child of its originating element, preceding any boxes generated by the '::before' pseudo-element, with content as specified by 'content'. ``` Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: Ie5058d66f90644f9732bc619a3f587b6203d1cf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925018 Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1371648}
…rt, a=testonly Automatic update from web-platform-tests Add ::check pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928423 Reviewed-by: Rune Lillesveen <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Traian Captan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369011} -- wpt-commits: 181e33be283f60d28349f6828782091489684ece wpt-pr: 48625
…rt, a=testonly Automatic update from web-platform-tests Add ::check pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928423 Reviewed-by: Rune Lillesveen <futharkchromium.org> Reviewed-by: Joey Arhar <jarharchromium.org> Commit-Queue: Traian Captan <tcaptanchromium.org> Cr-Commit-Position: refs/heads/main{#1369011} -- wpt-commits: 181e33be283f60d28349f6828782091489684ece wpt-pr: 48625 UltraBlame original commit: e6b51178ca094586c892c9d2a6f69c62d6877aa0
…rt, a=testonly Automatic update from web-platform-tests Add ::check pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928423 Reviewed-by: Rune Lillesveen <futharkchromium.org> Reviewed-by: Joey Arhar <jarharchromium.org> Commit-Queue: Traian Captan <tcaptanchromium.org> Cr-Commit-Position: refs/heads/main{#1369011} -- wpt-commits: 181e33be283f60d28349f6828782091489684ece wpt-pr: 48625 UltraBlame original commit: e6b51178ca094586c892c9d2a6f69c62d6877aa0
…rt, a=testonly Automatic update from web-platform-tests Add ::check pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I90fb6ef81fd5941709fae6936c7474339a7715e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928423 Reviewed-by: Rune Lillesveen <futharkchromium.org> Reviewed-by: Joey Arhar <jarharchromium.org> Commit-Queue: Traian Captan <tcaptanchromium.org> Cr-Commit-Position: refs/heads/main{#1369011} -- wpt-commits: 181e33be283f60d28349f6828782091489684ece wpt-pr: 48625 UltraBlame original commit: e6b51178ca094586c892c9d2a6f69c62d6877aa0
Automatic update from web-platform-tests Add ::check pseudo element This pseudo element is added to allow <option> elements inside <select> elements to have a standardized and customizable checkmark icon. Spec definition: ``` Option checkmark icon: the '::check' pseudo-element The '::check' pseudo-element is only generated when the originating element is a option element which has an ancestor select element with base appearance. '::check' is a tree-abiding pseudo-element. It accepts all properties. It inherits from its originating element. '::check' generates a box as if it was an child of its originating element, preceding any boxes generated by the '::before' pseudo-element, with content as specified by 'content'. ``` Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: Ie5058d66f90644f9732bc619a3f587b6203d1cf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925018 Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1371648} -- wpt-commits: da9d7dba3fc527999aeda736950cd9c3270314f8 wpt-pr: 48697
Automatic update from web-platform-tests Add ::check pseudo element This pseudo element is added to allow <option> elements inside <select> elements to have a standardized and customizable checkmark icon. Spec definition: ``` Option checkmark icon: the '::check' pseudo-element The '::check' pseudo-element is only generated when the originating element is a option element which has an ancestor select element with base appearance. '::check' is a tree-abiding pseudo-element. It accepts all properties. It inherits from its originating element. '::check' generates a box as if it was an child of its originating element, preceding any boxes generated by the '::before' pseudo-element, with content as specified by 'content'. ``` Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: Ie5058d66f90644f9732bc619a3f587b6203d1cf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925018 Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1371648} -- wpt-commits: da9d7dba3fc527999aeda736950cd9c3270314f8 wpt-pr: 48697
Automatic update from web-platform-tests Add ::check pseudo element This pseudo element is added to allow <option> elements inside <select> elements to have a standardized and customizable checkmark icon. Spec definition: ``` Option checkmark icon: the '::check' pseudo-element The '::check' pseudo-element is only generated when the originating element is a option element which has an ancestor select element with base appearance. '::check' is a tree-abiding pseudo-element. It accepts all properties. It inherits from its originating element. '::check' generates a box as if it was an child of its originating element, preceding any boxes generated by the '::before' pseudo-element, with content as specified by 'content'. ``` Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: Ie5058d66f90644f9732bc619a3f587b6203d1cf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925018 Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1371648} -- wpt-commits: da9d7dba3fc527999aeda736950cd9c3270314f8 wpt-pr: 48697
Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I4161a9a0111ff2247ab6d9009c5bdec96ac1c855 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967877 Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1375343}
Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I4161a9a0111ff2247ab6d9009c5bdec96ac1c855 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967877 Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1375343}
…g support, a=testonly Automatic update from web-platform-tests Add ::select-arrow pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I4161a9a0111ff2247ab6d9009c5bdec96ac1c855 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967877 Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1375343} -- wpt-commits: 2becea8aa06af9b51bb319f001aa880906fb26ec wpt-pr: 48861
…g support, a=testonly Automatic update from web-platform-tests Add ::select-arrow pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I4161a9a0111ff2247ab6d9009c5bdec96ac1c855 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967877 Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1375343} -- wpt-commits: 2becea8aa06af9b51bb319f001aa880906fb26ec wpt-pr: 48861
…g support, a=testonly Automatic update from web-platform-tests Add ::select-arrow pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I4161a9a0111ff2247ab6d9009c5bdec96ac1c855 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967877 Commit-Queue: Traian Captan <tcaptanchromium.org> Reviewed-by: Joey Arhar <jarharchromium.org> Reviewed-by: Kevin Babbitt <kbabbittmicrosoft.com> Cr-Commit-Position: refs/heads/main{#1375343} -- wpt-commits: 2becea8aa06af9b51bb319f001aa880906fb26ec wpt-pr: 48861 UltraBlame original commit: 2653a07709c1a504480fe822fbd193c72ee7d62e
…g support, a=testonly Automatic update from web-platform-tests Add ::select-arrow pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I4161a9a0111ff2247ab6d9009c5bdec96ac1c855 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967877 Commit-Queue: Traian Captan <tcaptanchromium.org> Reviewed-by: Joey Arhar <jarharchromium.org> Reviewed-by: Kevin Babbitt <kbabbittmicrosoft.com> Cr-Commit-Position: refs/heads/main{#1375343} -- wpt-commits: 2becea8aa06af9b51bb319f001aa880906fb26ec wpt-pr: 48861 UltraBlame original commit: 2653a07709c1a504480fe822fbd193c72ee7d62e
…g support, a=testonly Automatic update from web-platform-tests Add ::select-arrow pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I4161a9a0111ff2247ab6d9009c5bdec96ac1c855 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967877 Commit-Queue: Traian Captan <tcaptanchromium.org> Reviewed-by: Joey Arhar <jarharchromium.org> Reviewed-by: Kevin Babbitt <kbabbittmicrosoft.com> Cr-Commit-Position: refs/heads/main{#1375343} -- wpt-commits: 2becea8aa06af9b51bb319f001aa880906fb26ec wpt-pr: 48861 UltraBlame original commit: 2653a07709c1a504480fe822fbd193c72ee7d62e
…g support, a=testonly Automatic update from web-platform-tests Add ::select-arrow pseudo element parsing support Defined in: w3c/csswg-drafts#10986 Bug: 369319576 Change-Id: I4161a9a0111ff2247ab6d9009c5bdec96ac1c855 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967877 Commit-Queue: Traian Captan <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Kevin Babbitt <[email protected]> Cr-Commit-Position: refs/heads/main@{#1375343} -- wpt-commits: 2becea8aa06af9b51bb319f001aa880906fb26ec wpt-pr: 48861
Per the resolutions from this week's call, these should be renamed to Also, I thought from the discussion in the call that |
This PR adds the ::check and ::select-arrow pseudo-elements so that select elements can have a standardized and customizable dropdown icon on the button and checkmarks next to options.
Fixes #10908