Chris Coyier wrote about the new form-sizing: normal property, which can get a <textarea> to automatically expand to fit its content - but currently only in Google Chrome Canary. Chris also linked to his own favourite trick for doing that, using some CSS grid trickery (original idea by Stephen Shaw).

I decided to dig into that grid trick and figure out how it works, as well as adapt it slightly for my own preferences.

Here are [the changes I made to the CSS and HTML]https://gist.github.com/simonw/6815f73098c803e31fcd20059318b937/revisions. I'll describe my finished, adapted version of the trick below.

continue reading on til.simonwillison.net

⚠️ This post links to an external website. ⚠️