Skip to content

Commit cd37bd4

Browse files
fix(ui): add min-height and padding to textarea field (#16442)
Fixes textarea field shrinking below a minimum height when content is typed and adds proper padding. ### Changes - Adds `padding: var(--spacer-2)` to textarea for consistent 8px padding (matching Figma design) - Removes the `:not(:empty)` selector that was overriding min-height with a rows-based calculation that could be smaller than the base min-height or invalid when `--rows` wasn't set ### Before Textarea would shrink to content size as you typed, potentially becoming very small. ### After Textarea maintains a minimum height of `3.75rem` and grows with content via `field-sizing: content`.
1 parent da5dd8a commit cd37bd4

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎packages/ui/src/fields/Textarea/index.css‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
height: auto;
1919
display: flex;
2020
field-sizing: content;
21+
padding: var(--spacer-2);
2122

2223
&:hover:not(:focus):not(:disabled) {
2324
border-color: var(--border-default-default);
@@ -28,10 +29,6 @@
2829
}
2930
}
3031

31-
textarea:not(:empty) {
32-
min-height: calc(var(--rows) * var(--base) + 1rem + 0.125rem);
33-
}
34-
3532
&.read-only {
3633
textarea {
3734
background: var(--bg-default-default);

0 commit comments

Comments
 (0)