W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: [CSS21] Does the root element establish a root block formatting context?

From: Alan Gresley <alan@css-class.com>
Date: Fri, 27 Aug 2010 21:54:23 +1000
Message-ID: <4C77A76F.9080204@css-class.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: www-style@w3.org
Boris Zbarsky wrote:
> On 8/26/10 10:45 PM, Alan Gresley wrote:
>> The part "base writing direction of blocks" is in other words a 'block
>> formatting context'.
> No, it in fact is not.  Please look up the quite different definition of 
> "block formatting context" in CSS2.1.
> -Boris

This is what I see in 9.4.1 - Block Formatting Context [1].

   | In a block formatting context, boxes are laid out one
   | after the other, vertically, beginning at the top of
   | a containing block. The vertical distance between two
   | sibling boxes is determined by the 'margin' properties.
   | Vertical margins between adjacent block boxes in a
   | block formatting context collapse.

The above suggest that there is an *initial* 'block formatting 
context' (or perhaps *root* 'block formatting context'). This is seen 
when the viewport is shortened to allow the float to overflow the 
viewpoint in this testcase.


Even thought this is not stated in the specs, a floats' bottom edge 
can not cross the bottom padding-edge of it parent if the parent has a 
CSS value that establishes a new 'block formatting context' but what 
we have is a root element of a document tree that is also described as 
the canvas [2].

   | For all media, the term  canvas describes "the space where
   | the formatting structure is rendered."

I don't think that I am suggesting something else that is much 
different to what David B. has also seem to have just asked.

 > Section 9.4.1 describes which elements establish *new* block
 > formatting contexts (i.e., block formatting contexts that are inside
 > others), but it doesn't say whether the block formatting context
 > that the root element participates in is established by the root
 > element or by something above the root element (such as the canvas).

I say that block progression (or block flow) can only happen in a 
'block formatting context'. ltr and rtl share the same block flow [3] 
and in CSS3 Test Layout Module we see this.

   | A writing mode is defined in terms of its inline direction
   | (inline progression) and its block flow (block progression).

I do believe this should be clarified since IE8 now implements various 
writing-modes that causes a horizontal block-flow or horizontal block 


Note how the float is contained in both test. This is because IE8 
generates a new 'block formatting context'. This is not mentioned in 
CSS2.1 9.4.1 or the CSS3 Text Layout Module.

1. <http://www.w3.org/TR/CSS21/visuren.html#block-formatting>
2. <http://www.w3.org/TR/CSS21/intro.html#the-canvas>
3. <http://dev.w3.org/csswg/css3-text-layout/#text-flow>

Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Friday, 27 August 2010 11:54:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:34:40 UTC