Stylish HTML: Auto-growing textareas with field-sizing: content

Coming in the next version of Safari, and already in Chrome and Edge, you can now create <textarea>s that auto-grow with the field-sizing: content rule.

textarea {
field-sizing: content;
min-block-size: attr(rows rlh);
}

The min-block-size: attr(rows rlh) ensures the textarea still respects its rows attribute as a minimum height, using the rlh unit (root line height).

Demo:

A textarea that automatically grows as the user types more content