Skip to content

Add customizable select listbox feature - #4684

Open
tunetheweb wants to merge 7 commits into
web-platform-dx:mainfrom
tunetheweb:customizable-select-listbox
Open

tunetheweb wants to merge 7 commits into
web-platform-dx:mainfrom
tunetheweb:customizable-select-listbox

Conversation

@tunetheweb

Copy link
Copy Markdown
Contributor

Fixes #4551

The reasons for making this a separate feature are noted in that issue.

@github-actions github-actions Bot added the feature definition Creating or defining new features or groups of features. label Nov 24, 2026

@ddbeck ddbeck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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:

Suggested change
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.

@tunetheweb tunetheweb Dec 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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-2

And:

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-2

The 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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@tunetheweb
tunetheweb requested a review from ddbeck December 1, 2026 16:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customizable <select> in listbox mode

3 participants