W3C home > Mailing lists > Public > www-style@w3.org > January 1999

Re: CSS equivalent to WRAP?

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Fri, 29 Jan 1999 13:40:34 +0000 (BST)
To: "Eric A. Meyer" <emeyer@sr71.lit.cwru.edu>
cc: www-style@w3.org
Message-ID: <Pine.GSO.4.04.9901291330590.18258-100000@ss1.bath.ac.uk>
On Thu, 28 Jan 1999, Eric A. Meyer wrote:

> A discussion recently cropped up on the WSP Standards list to the
> effect of "how come neither HTML or CSS have the WRAP attribute, or
> its equivalent, for TEXTAREA elements?" I postulated that
> 'white-space' might be that equivalent, but not too many people
> bought it-- including me, once I really thought about it.
> 'white-space: normal' would cause the collapse of whitespace in the
> user input,
Hmm.

I suggest a fourth value for white-space: nocollapse. Then, the pre vale
would be like having both nowrap and nocollapse at the same time.

Thus:

--------------------------------------------------------8<------------
     
   'white-space'

          Value:       normal | pre | nowrap [INS:] | nocollapse [:INS] |
                       inherit
          Initial:     normal
          Applies to:  all elements
          Inherited:   yes
          Percentages: N/A
          Media:       visual

   This property declares how whitespace inside the element is
   handled. Values have the following meanings:

   normal 
          This value directs user agents to collapse sequences of
          whitespace, and break lines as necessary to fill line boxes.
          Additional line breaks may be created by occurrences of "\A"
          in generated content (e.g., for the BR element in HTML).

   pre              
          This value prevents user agents from collapsing sequences of
          whitespace. Lines are only broken at newlines in the source,
          or at occurrences of "\A" in generated content.
     
   nowrap
          This value collapses whitespace as for 'normal', but
          suppresses line breaks within text except for those created
          by "\A" in generated content (e.g., for the BR element in
          HTML).

[INS:]     
   nocollapse
          This value prevents user agents from collapsing sequences of
          whitespace, as for 'pre', but lines may be broken as necessary
          to fill line boxes. Additional line breaks may be
          created by occurrences of "\A" in generated content (e.g.,
          for the BR element in HTML).
[:INS]

--------------------------------------------------------8<------------

> plus 'white-space' applies to block-level elements, which TEXTAREA
> is not (right?).
It is a replaced element.

However, it has already been suggested that white-space be allowed on
all elements in CSS3. The above suggestion takes that as a given.

-- 
Ian Hickson
Received on Friday, 29 January 1999 08:40:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:58 GMT