W3C home > Mailing lists > Public > www-style@w3.org > October 2001

Whitespace control for generated content

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 20 Oct 2001 18:59:46 +0200
To: www-style@w3.org
Message-ID: <m5a3tt0ang2q2k1500i0d1d0p266soahq7@4ax.com>
Hi,

   The current CSS3 Text Module defines only whitespace control for
element content, leaving alone the rules for rendering whitespace in
attribute values. I am not sure what impact this has for HTML documents,
since the whitespace control is defined in terms of shoulds, but XML and
by reference XHTML documents have strict rules for whitespace
normalization in attribute values, i.e. leading and trailing whitespace
aswell as sequences of whitespace are preserved for CDATA attributes and
line feed/carriage return character references are also preserved.
Consider a case like

  <img alt='...' title='...&#xa;...' src='...' />

with

  img::before
  {
    content:    attr(title);
    text-space: honor;
    text-wrap:  none;
  }

Would this be displayed as

  ...
  ...[img:...]

or

  ... ...[img:...]

or how else? Or what if the content is specified in the style sheet,
e.g.

  img::before
  {
    content:    "  ... \
\
...  ";
    text-space: honor;
    text-wrap:  none;
  }

How shall user agents treat whitespace in generated content originating
in the style sheet or attributes in the document? Shall the user agent
normalize the content as if it were element content? Apply whitespace
control properties to generated content? When do they apply? If they
don't apply, how to deal with e.g. line feeds from attribute values?

I think the modules on text and generated content should say something
on this issue, CSS Level 2 keeps mum on this.

regards,
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Saturday, 20 October 2001 13:00:54 GMT

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