Basically, it would be awesome if there was a way to specify behavior like http://leaverou.github.io/stretchy/ purely in CSS, with a rule like width: fit-value
for <input>
.
For <textarea>
, this is a bit more complex: maybe <textarea>
could have a rule like height: introduce-line(50%)
, which states the <textarea>
should make room for one more line once its last line takes up more than 50% of the width. As for defining width, perhaps that could be something like width: fit-line(400px)
, which says "expand your width automatically, then start wrapping at 400px
" (though I kind of feel textarea
width should be fixed, and it should certainly be expanded as soon as text continues to multiple lines).
Ping @leaverou