Re: 2 Markers and a run-in

At 17:26 4-11-99 -0500, you wrote:
>On Thu, 04 Nov 1999 22:57:49 +0100, ament (ament@xs4all.nl) wrote:
>> 
>> I'm wondering for a couple of days how the following example would be
>> rendered using CSS2.
>> (I need to know it for implementing css2)
>> 
>> [*] = not part of the document-tree
>> :before and :after are acting like a sibling
>> 
>> * Part of example document-tree
>>  [*] R:before (marker)
>>   *  R (run-in)
>>  [*] P:before (marker)
>>   *  P (block-box ; non-floating ; not absolutely positioned)
>> 
>> Would it result in a block-box 'P' containing R as an inlinebox and having
>> R:before and P:before as a marker?
>
>No.  The R element is an inline element, so its :before pseudo element
>has its 'display' property changed to 'inline' (according to the last
>paragraph of CSS2 12.1).
>
>Therefore, it will be rendered as a block box (the P element), with
>marker containing the 'content' matching P:before, with the following
>inside the box:
> * the 'content' matching the R:before (inline, computed from marker)
> * the content of the R (inline, computed from run-in)
> * the content of the P (anything)
>
>David
>

Yes. Makes sense..

But what if we use a compact element instead of the run-in?

* Part of another example document-tree
 [*] R:before (marker)
  *  R (compact)
 [*] P:before (marker)
  *  P (block-box ; non-floating ; not absolutely positioned)

If inline(R:before)+inline(R) can live in P's left-margin:
  => * R acts like inline
  => * R:before acts like inline
if it can't:
  => * R acts like block box

Mark


--------
* left-margin may also be right-margin (depends on direction)

Received on Thursday, 4 November 1999 19:13:16 UTC