Skip to content

Conversation

@lukewarlow
Copy link
Member

@lukewarlow lukewarlow commented Mar 9, 2025

Base select is always sized based on its content size rather than using the legacy fixed styling, so we set field-sizing to content !important.

See #11838 (comment)

Base select is always sized based on its content size rather than using the legacy fixed styling, so we set field-sizing to content !important.
@lukewarlow lukewarlow requested a review from nt1m March 9, 2025 17:14
```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.

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

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants