field-sizing
CSS property letting a form control size itself to its content instead of having a fixed default size.
With field-sizing: content a textarea grows as you type, and a select becomes exactly as wide as the chosen option requires. That sounds small but removes one of the web's most persistent little hacks: mirroring the textarea's content into a hidden div, measuring the div's height and setting it on the textarea on every keystroke. Every component library has had a version of that code, and it has always broken on something — line breaks, late-loading fonts, pasted text. Combine it with min-height and max-height to set bounds. Support exists in Chromium from version 123 and is still absent in other engines.