Sep 30, 2023#p2
Yesterday, Chris Coyier mentioned a proposal to auto-size textareas based on their content using just CSS:
textarea {
field-sizing: normal;
}
Somewhat coincidentally, OTD yesterday showed that, in 2020, I added a JavaScript solution to auto-size textareas for the custom posting form in the old WordPress blog.
What's curious is that I obviously forgot about that and used completely different code to achieve the same result in (b)log-In.
The CSS solution is only in Chrome Canary for now (with the right flag enabled) but it will be great if it gets wider support. I primarily use Chromium based browsers (Brave on mobile, Arc on Mac) so will be happy if it just gets support in these, even if flags are required. It will mean I can rip out some clumsy JavaScript and keep things simpler.