W3C home > Mailing lists > Public > www-style@w3.org > September 2002

Re: CSS2.1: \A and white-space

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Thu, 5 Sep 2002 11:15:47 -0400
To: Bert Bos <bert@w3.org>
Cc: www-style@w3.org
Message-ID: <20020905111547.A16930@is02.fas.harvard.edu>

On Monday 2002-08-26 18:56 +0200, Bert Bos wrote:
> No, the 'white-space' property has no effect on '\A', since the '\A'
> is not inserted into the *input* of the CSS renderer, but into the
> *output*. Whitespace in the input is a form of mark-up and is thus

By that logic, how do you explain that the 'text-transform' property
does apply?  Or, for that matter, 'text-decoration'?  Or 'color'?

> interpreted by the HTML (or XML) parser and further undergoes
> transformations by the CSS renderer. But the '\A' is simply part of
> the rendered output. You can regard it as a glyph or as a control
> code, but the term "whitespace" doesn't apply to it.
> 
> It is the same situation as when you do this:
> 
>   p:before {content: "<em>"}
> 
> That simply inserts four literal characters into the ouput, it does
> not create an EM element.

Given the CSS

  p {
    border: thin solid black;
    width: 30ex;
    padding: 0 1ex;
  }

  p:after {
    content: "[End of the paragraph.]";
  }

would the correct layout of the markup

  <p>This is a paragraph that might have a narrow width.</p>

be

  ----------------------------------
  | This is a paragraph that might |
  | have a narrow width.           |
  | [End of the paragraph.]        |
  ----------------------------------

or

  ----------------------------------
  | This is a paragraph that might |
  | have a narrow width.  [End of  |
  | the paragraph.]                |
  ----------------------------------

or

  ----------------------------------
  | This is a paragraph that might |
  | have a narrow width.           |
  --[End-of-the-paragraph.]---------

or

  ----------------------------------
  | This is a paragraph that might |
  | have a narrow width.  [End of  |
  --the-paragraph.]-----------------

or

  ----------------------------------
  | This is a paragraph that might |
  | have a narrow width.  [End of the paragraph.]
  ----------------------------------

I'm not sure how seriously to take this idea of "inserting into the
output".

-David

-- 
L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >
Received on Thursday, 5 September 2002 11:15:49 GMT

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