Re: Generated content

--- "L. David Baron" <dbaron@fas.harvard.edu> wrote:
> On Fri, 04 Feb 2000 13:48:58 -0800, Matthew Brealey
> (thelawnet@yahoo.com) wrote:
> > 
> > > Re: Generated content
> > > 
> > > From: Ian Hickson (py8ieh@bath.ac.uk)
> > > >>> 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.
> > > 
> > > Section 12.1:
> > > # [The] :before and :after pseudo-elements specify the location of
> > > # content before and after an element's document tree content.
> > That doesn't, I fear, answer my question.
> 
> It does, since the content is inserted adjacent to the element's
> document
> tree content (and thus within the element).  However, the next normative
> paragraph in section 12.1 of CSS2 answers this question explicitly:
> 
> # The formatting objects (e.g., boxes) generated by an element include
> # generated content.
1.A 'run-in' or 'compact' element has a :before pseudo-element of type
'inline': the pseudo-element is taken into account when the size of the
element's box is computed (for 'compact') and is rendered inside the same
block box as the element. 
2.A 'run-in' or 'compact' element has an :after pseudo-element of type
'inline': The rules of the previous point apply. 
3.A 'run-in' or 'compact' element has a :before pseudo-element of type
'block': the pseudo-element is formatted as a block above the element, and
does not take part in the computation of the element's size (for
'compact'). 
4.A 'run-in' or 'compact' element has an :after pseudo-element of type
'block': both the element and its :after pseudo-element are formatted as
block boxes. The element is not formatted as an inline box in its own
:after pseudo-element. 
5.The element following a 'run-in' or 'compact' element has a :before of
type 'block': the decision how to format the 'run-in'/'compact' element is
made with respect to the block box resulting from the :before
pseudo-element. 
6.The element following a 'run-in' or 'compact' element has an :before of
type 'inline': the decision how to format the 'run-in'/'compact' element
depends on the 'display' value of the element to which the :before is
attached. 

This seems to be contradictory, talking of elements _above_.
 

=====
----------------------------------------------------------
From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Received on Monday, 7 February 2000 04:07:20 UTC