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

Re: Generated content

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Mon, 31 Jan 2000 13:00:30 -0800
Message-ID: <3895F7EE.D15@yahoo.com>
To: www-style@w3.org
Ian Hickson wrote:
> On Wed, 26 Jan 2000, Matthew Brealey wrote:
> > This fails to define the rendering of
> >    P.note:before { content: "Note: "; display: block; }
> >    P.note        { border: solid green }
> > - does the border cover the block before.
> >
> > The spec does not say whether it does. Clearly the best answer is
> > no, [...]
> 
> (Clearly?)
> 
> The answer is actually yes. 
Spec reference please - I don't think it is possible to say for certain
either way.

> In the case above, you get pseudo markup
> equivalent to:
> 
>    <p>
>       <p:before>
>          <anonymous-inline>Note: </anonymous-inline>
>       </p:before>
>       <anonymous-block>
>          <anonymous-inline>....</anonymous-inline>
>       </anonymous-block>
>    </p>
> 
> Thus the border surrounds the :before as well as the element's 'real'
> content.
The reason I think you are wrong is because given
P.note:before { content: "Note: "; display: marker}
P.note        { border: solid green }

the border doesn't cover the marker box (the spec is very explicit on
this), so there is certainly is an indication that this result is
possible at least for some generated content.

In addition, it tends to give better results - you cannot set the
margins of the anonymous block with the interpretation that you take. 

Some normative statement would be nice though...
Received on Monday, 31 January 2000 07:59:15 GMT

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