A textarea that grows as you type — like a chat input — has long been impossible without JS. `rows` only sets a fixed line count; growing to fit content required an input listener that reads `scrollHeight` and writes it back into `height` on every keystroke.
`field-sizing: content` makes a textarea or input follow its content size instead of an explicit `width`/`height`. Paired with `min-height`/`max-height`, "auto-grow up to 3 lines, then scroll" becomes pure CSS.
Check caniuse/MDN baseline for support. Without it, the classic auto-resize script — reading `scrollHeight` and writing `el.style.height` on every input event — is still needed.
When to use
Building a chat or comment input that auto-grows with its content, without JS.