Repository navigation
Add customizable select listbox feature - #4684
tunetheweb wants to merge 7 commits into
Conversation
ddbeck
left a comment
There was a problem hiding this comment.
I've got some ideas for the description and spec URL, assuming this is in fact a separate feature. But I'm still uncertain about the fate of customizable-select.
That feature's description is:
The
<select>element's appearance, including the button, selected option, picker dropdown, and options, can be customized using CSS.
I can't really read that as saying that <select size> or <select multiple> is excluded. And that feature also doesn't have a proper specification URL — no one ever did the follow up work discussed in #2301, assuming the spec work ever did actually finish — that I can't say how closely what capabilities actually appeared in the spec aligned with the Open UI explainer.
My guess is that the original customizable-select feature needs to have its name and description revised to explain that it applies to selects that are dropdown menus only, but it's a low confidence guess.
| @@ -0,0 +1,8 @@ | |||
| name: Customizable <select> listbox | |||
| description: The `<select>` element's appearance can be customized using CSS when displayed as a list box (using the `multiple` or `size` attributes). | |||
There was a problem hiding this comment.
Understanding what this thing actually does is hard and discerning this feature from customizable-select is even harder. After much head scratching, I'm going to suggest reformulating the description like this:
| description: The `<select>` element's appearance can be customized using CSS when displayed as a list box (using the `multiple` or `size` attributes). | |
| description: The `<select size>` or `<select multiple>` HTML element appears as a list box. With the `appearance: base-select` CSS declaration applied, you can style the box and its contents. |
I'm not committed to this specific phrasing, but I think we need to do something here to explain "list box" and the role of CSS.
There was a problem hiding this comment.
WDYT of this:
name: Customizable <select> listbox
description: The `<select>` element when displayed as a list box (using `<select size>` or `<select multiple>`) can have its appearance customized using CSS, with with the `appearance` CSS property set to `base-select`.
spec:
- https://drafts.csswg.org/css-ui/#valdef-appearance-base-select
- https://html.spec.whatwg.org/multipage/rendering.html#the-select-element-2And:
name: Customizable <select> dropdown
description: The `<select>` element when displayed as a drop down can have its appearance customized using CSS, including the button, selected option, picker dropdown, and options, with the `appearance` CSS property set to `base-select`.
spec:
- https://drafts.csswg.org/css-ui-4/#valdef-appearance-base-select
- https://html.spec.whatwg.org/multipage/rendering.html#the-select-element-2The spec links are the same (as they are specified in the same place, though on slightly different lines):
select elements which render as a drop-down box support a base appearance in addition to native appearance and primitive appearance.
select elements which render as a drop-down box without the multiple attribute or as a list box support a base appearance in addition to native appearance and primitive appearance.
I suspect we'll want to merge these two features into the future, but I'm mindful of @LeaVerou 's point that we may not want to regress Safari's status for the more common drop down option (especially as I work for Chrome), since that doesn't serve developers well. Especially if Firefox supports that as well in the future.
Then again, as they are new, are not Baseline yet, maybe we should just have the one feature and add the new BCD key to the existing customizable-select feature?
There was a problem hiding this comment.
Do note that the plan is to make <select size=1 multiple> an actual multiselect (already prototyped in Chrome), which would be a third separate customizable-select feature. Perhaps customizable-select should become a group encompassing customizable-select-dropdown, customizable-select-listbox, customizable-select-multiselect? Though not sure if redirects can accommodate that.
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
Fixes #4551
The reasons for making this a separate feature are noted in that issue.