Skip to content

Conversation

thecrypticace
Copy link
Contributor

This PR adds support for the field-sizing property which can be used to fit a text inputs, file inputs, textareas, and selects to the size of the text rather than some implicit default width.

@adamwathan
Copy link
Member

Nice 😎 Where should we stick this in the property-order.ts file do you think? 🤔

@thecrypticace
Copy link
Contributor Author

I was wondering if we needed to. What about after aspect-ratio? I put it there in the utilities file because it affects the size of some elements but isn't itself a way to set a specific size.

@adamwathan
Copy link
Member

Let's do it right before the aspect-ratio since aspect-ratio, width, and height all take precedence in the browser if you define them.

@thecrypticace thecrypticace force-pushed the feat/v4-field-sizing-utilities branch from dfbb5d5 to 0c92591 Compare September 20, 2024 14:44
@adamwathan adamwathan force-pushed the feat/v4-field-sizing-utilities branch from 5036a84 to 6c95e39 Compare September 20, 2024 14:50
@adamwathan adamwathan merged commit fe2610e into next Sep 20, 2024
3 checks passed
@adamwathan adamwathan deleted the feat/v4-field-sizing-utilities branch September 20, 2024 14:50
adamwathan added a commit that referenced this pull request Sep 20, 2024
This PR adds support for the
[`field-sizing`](https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing)
property which can be used to fit a text inputs, file inputs, textareas,
and selects to the size of the text rather than some implicit default
width.

---------

Co-authored-by: Adam Wathan <[email protected]>
Comment on lines +889 to +890
staticUtility('field-sizing-fixed', [['field-sizing', 'fixed']])

Choose a reason for hiding this comment

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

missing field-sizing: normal

staticUtility('field-sizing-normal', [['field-sizing', 'normal']])

Copy link
Contributor Author

@thecrypticace thecrypticace Apr 20, 2025

Choose a reason for hiding this comment

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

normal was replaced with content in late 2023 while the spec was still a work in progress

"end-auto",
"end-full",
"field-sizing-content",
"field-sizing-fixed",

Choose a reason for hiding this comment

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

missing normal

"field-sizing-normal",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants