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

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

From: Anton Prowse <prowse@moonhenge.net>
Date: Thu, 26 Aug 2010 19:18:40 +0200
Message-ID: <4C76A1F0.6040000@moonhenge.net>
To: www-style@w3.org
CC: "L. David Baron" <dbaron@dbaron.org>
On 26/08/2010 17:59, L. David Baron wrote:
> When the root element is a block, it clearly participates in a block
> formatting context, as described in CSS 2.1 section 9.4:
>    # Boxes in the normal flow belong to a formatting context, which
>    # may be block or inline, but not both simultaneously. Block boxes
>    # participate in a block formatting context.

Indeed.  This ties in with my recent musings that perhaps we don't want 
the root box, floats and abspos elements to be considered block-level at 
all (although the root element is sometimes a block container whilst 
floats and absposes always are).

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

As I understand it, an element which establishes a new BFC sometimes 
participate in a BFC  but those two BFCs are never the same.  It 
doesn't make much editorial sense to me that they could coincide, but I 
don't think it's actually important except in this particular case of 
the root element.

> This matters because this affects whether the root element's height
> is computed using the rules in section 10.6.3 or the rules in
> section 10.6.7.  This difference in height is detectable using
> bottom-positioned background images, as reported in
> https://bugzilla.mozilla.org/show_bug.cgi?id=590491 .  The reporter
> of that bug states that Gecko expands the root element for floats
> (following the rules in 10.6.7) while Opera and WebKit do not
> (following the rules in 10.6.3).

Useful info, thanks.  It seems that this issue needs resolution.

Anton Prowse
Received on Thursday, 26 August 2010 17:20:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:49 UTC