Re: Generated content

On Mon, 31 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.

Section 12.1:
# [The] :before and :after pseudo-elements specify the location of
# content before and after an element's document tree content.


>> 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.

This is because marker boxes, like positioned and floated boxes, are
not in the normal flow.

-- 
Ian Hickson                            ("`-''-/").___..--''"`-._   
http://www.bath.ac.uk/%7Epy8ieh/        `6_ 6  )   `-.  (     ).`-.__.`)
                                        (_Y_.)'  ._   )  `._ `. ``-..-' fL
Member, Mozilla Quality Assurance     _..`--'_..-_/  /--'_.' ,'
Browser Standards Compliance Team    (il).-''  (li).'  ((!.-'    

Received on Monday, 31 January 2000 16:39:06 UTC