Automatic resizing of textareas and inputs using CSS

2024-02-19

There’s a new CSS property landing in Chrome 123 that will automatically resize textareas and inputs based on its content. Since I could not remember its name and only found it by digging through my Mastodon conversations and finding this post by Jen Simmons again, I thought I’d note it down here.

The property is called field-sizing and has two possible values: strict (default, just as before) and content which will automatically grow the element if needed.

The team at Polypane did a great job explaining it in more detail in this blog post: Field-sizing just works! – go read it if you have not heard about it.