Loading...
textarea {
field-sizing: content;
}textarea {
field-sizing: content;
min-height: 3lh;
max-height: 10lh;
}The limits keep the textarea from collapsing when empty and from growing past the screen.
field-sizing: content instead of JavaScript that resizes on every input.min- and max- width or height limits are set, so the field neither collapses nor grows without end.Yes. With field-sizing: content, a text input grows in width as the user types.
The field keeps its fixed default size, so set a sensible min-height or rows that works either way.