[whatwg] Why there is no wrap="off", intentional or forgotten?
Ashley Sheridan
ash at ashleysheridan.co.uk
Wed Jun 2 04:05:37 PDT 2010
On Wed, 2010-06-02 at 12:51 +0200, Oldřich Vetešník wrote:
> Hi,
>
> I'm missing the wrap="off" value for textarea wrap attribute; is there any
> particular reason why this is not part of HTML5?
> Currently the only values mentioned are "soft" and "hard":
>
> http://dev.w3.org/html5/spec/the-button-element.html#attr-textarea-wrap
>
> "The wrap attribute is an enumerated attribute with two keywords and
> states: the soft keyword which maps to the Soft state, and the hard
> keyword which maps to the Hard state. The missing value default is the
> Soft state."
>
> However, I'd like to use wrap=off because I don't want the lines to wrap.
> (Like when you have a HTML in textarea.)
> I haven't found any other way to "force" this behavior (yep, I tried
> white-space: nowrap;).
> I tested it in all major browsers on Windows and it works, it just won't
> validate. :)
>
> Code
> <textarea cols=50 rows=10 wrap=soft></textarea>
> <textarea cols=50 rows=10 wrap=hard></textarea>
> <textarea cols=50 rows=10 wrap=off></textarea>
> More at http://server.ebrana.cz/olda/_apps/html5/textarea-wrap.html
>
> There is also no mention in the spec about wrap=virtual and wrap=physical
> back from the days.
> http://www.htmlcodetutorial.com/forms/_TEXTAREA_WRAP.html
>
> Thanks,
> Ollie
That does seem odd. I would have thought the default value would be
'off' or 'no' as I've never seen a browser yet wrap text in a textarea
unless a specific wrapping method was specified either via an attribute
or CSS.
Thanks,
Ash
http://www.ashleysheridan.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100602/bfc54416/attachment-0002.htm>
More information about the whatwg
mailing list