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

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 UTC