— by Nesim
field-sizing: content
in CSS allows you to control the size of input fields based on their content.
On input
s, it will only affect the width of the field. On textarea
s, it will affect both the width and height.
On a select
element, the width will shrink down to the width of the shortest option, but it will grow to the width of the selected option.