Re: Suggest a property for autoresizing textarea

On Mon, 29 Mar 2010 00:26:59 -0700, ATSUSHI TAKAYAMA  
<taka.atsushi@googlemail.com> wrote:
> I got redirected from WHATWG about this topic.
> http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-March/025655.html
>
> It would be nice if there was a single CSS property that fits textarea
> hight automatically to its content. It is clear that this feature is
> vastly desired and being implemented with JavaScript. (Search
> "autoresize textarea" on the web for example)
>
> I would have thought "hight:auto" should do the job, but that wasn't
> the case. Can anyone explain why "height:auto" or "max-height:auto"
> for textarea does not work for this purpose?

The general problem is that styling is not defined for form controls. They  
are considered out of scope as far as CSS is concerned. Browsers have  
implemented support for CSS properties anyway to various degrees (and the  
CSS WG has defined pseudo-classes and even pseudo-elements for form  
controls ironically), but none of the styling is documented.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 30 March 2010 01:28:22 UTC