Previous Message
Next Message

Automatic resizing of textareas and contenteditable elements

Sent by Markus Ernst on 31 March 2011 10:10


Hello

Some days ago I encountered that Firefox 4 and Google Chrome implement 
the resize property:
http://www.w3.org/TR/css3-ui/#resizing

They default the textarea element to resize:both, which is IMO a nice 
usability boost. Now there are websites such as Facebook that use 
scripting to dynamically adapt the height of textareas to the amount of 
text contained, which works more or less well.

It would be nice to tell textareas and contenteditable elements to grow 
with their contents. Maybe this could be achieved with no spec change, like:

textarea, *[contenteditable] {
   height:auto;
   min-height:5em;
}

Is something like that possible with CSS3? If not, do you think the 
above approach is sensible and should be suggested to browser vendors, 
or would this rather be a case to propose a new property such as 
"autoresize" to the CSS Working Group?

Thanks for some opinions.
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message