W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2010

[whatwg] Why there is no wrap="off", intentional or forgotten?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 02 Jun 2010 16:25:51 -0400
Message-ID: <4C06BE4F.8070301@mit.edu>
On 6/2/10 10:10 AM, Lachlan Hunt wrote:
> In theory, you can achieve the same effect by using CSS.
>
> textarea { white-space: nowrap; }
>
> This works fine in Opera, WebKit and IE. Doesn't work in Gecko though.

That would be because nothing defines the interaction of CSS with the 
contents of replaced elements (which textarea happens to be in at least 
Gecko, and probably all browsers).  In particular, Gecko's 
implementation actually has a box inside the textarea that has 
white-space styles applied to it based on the textarea's "wrap" attribute.

If you think that the above style should do something to <textarea>, 
then the HTML spec needs to explicitly say so, since it's what defines 
how the inside of a textarea is rendered, not CSS per se.

-Boris
Received on Wednesday, 2 June 2010 13:25:51 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:24 UTC