Skip to content

[css-forms-1] Add field-sizing to base select styles #11879

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

Merged
merged 1 commit into from
Mar 9, 2025
Merged
Changes from all commits
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
5 changes: 5 additions & 0 deletions css-forms-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,11 @@ input[type=radio]::checkmark {
## Selects & buttons

```css
select {
/* Base appearance select always sizes based on its contents. */
field-sizing: content !important;
Copy link
Member Author

Choose a reason for hiding this comment

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

!important for now but if we decided to enable the legacy layout (size based on layout of longest option) we could remove that modifier and allow authors to set to fixed to enable it.

Copy link
Member Author

Choose a reason for hiding this comment

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

We maybe only want this for dropdown select and not for listbox select but we can handle that once we have a selector to choose between them.

}

button,
::file-selector-button,
select,
Expand Down