[whatwg] Textarea wrap=off

Ian Hickson ian at hixie.ch
Fri Aug 14 02:22:03 PDT 2009


On Fri, 7 Aug 2009, Tab Atkins Jr. wrote:
>
> Proposal
> ========
> Add the "off" state to the @wrap attribute for textareas.
> 
> Explanation
> ===========
> The "off" state prevents a textarea from wrapping text at all while
> displaying.  Instead, text that is too long for the textarea trigger a
> horizontal scrollbar, but stays on one line.  The only way for text to
> drop to a new line is with an actual carriage return.
> 
> The value of a textarea with wrap=off is the same as wrap=soft.
> 
> Reasoning
> =========
> Every UA I've tested (FF3.5, IE7, Opera10B2, Safari4, Chrome2) already
> supports it.  They offer slightly different displays of a wrap=off
> textarea, but the basic functionality as described above is identical
> and seemingly interoperable.  Adding this to the spec shouldn't
> require any additional work from the UAs, it would merely be
> recognizing and enshrining a facility that is already common to all of
> them.

The "off" value is already defined in HTML5 for the purpose of rendering 
[1]. However, it isn't a conforming value, because it appears to have no 
purpose other than a visual presentational effect.


[1] Last paragraph of:
http://www.whatwg.org/specs/web-apps/current-work/#the-textarea-element-0

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list