field-sizing isn't only about growing textareas
Written by Stefan Judis
- Published at
- Updated at
- Reading time
- 1min
This post is part of my Today I learned series in which I share all my web development learnings.
There's a new CSS property in town: field-sizing
. field-sizing: content
allows form controls to adjust in size to fit their contents. At the time of writing this property is still in flux in terms of baseline support.
MDN Compat Data (source)
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
123 | 123 | 123 | Nö | Non | preview | preview | 27.0 | 123 |
So far, I've thought the new property is only about expanding textarea
elements, but apparently it works for other input elements, too.
That's good stuff!
If you enjoyed this article...
Join 6.2k readers and learn something new every week with Web Weekly.
Reply to this post and share your thoughts via good old email.