Skip to content

Commit 7831a40

Browse files
chore: add field-sizing to select and textarea (#535)
* chore: add field-sizing to select and textarea * Update src/extra/normalize.src.css --------- Co-authored-by: Adam Argyle <[email protected]>
1 parent 077a3a8 commit 7831a40

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/extra/normalize.src.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,20 @@
130130
:where(select) {
131131
padding-inline: var(--size-relative-4) 0;
132132
padding-block: .75ch;
133+
field-sizing: content;
133134
}
134135

135136
:where(textarea, select, input:not([type="button"],[type="submit"],[type="reset"])) {
136137
background-color: var(--surface-2);
137138
border-radius: var(--radius-2);
138139
}
139140

140-
:where(textarea) { resize: block }
141+
:where(textarea) {
142+
resize: block;
143+
field-sizing: content;
144+
min-inline-size: var(--size-content-1);
145+
min-block-size: 2lh;
146+
}
141147

142148
:where(input[type="checkbox"], input[type="radio"]) {
143149
block-size: var(--size-3);

0 commit comments

Comments
 (0)