Glossary
Field-sizing
Field-sizing
Field-sizing is a CSS property that lets form elements like text areas, inputs, and select fields grow or shrink automatically to fit their content. Setting it to `content` makes the field expand as someone types; the default, `fixed`, keeps it locked at a set size.
Before field-sizing shipped, getting a text area to grow with its content meant writing custom JavaScript to measure and resize the box on every keystroke. Now browsers handle it natively, so an input field can resize itself with one line of CSS instead of a script.
Relevant courses
Other glossary terms
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Hmm…we couldn’t find any results. Try a different search term or reset the filter.
Reset the filter