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

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

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 26 Aug 2010 17:59:12 +0200
To: www-style@w3.org
Message-ID: <20100826155912.GA23932@pickering.dbaron.org>
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.

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

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


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Thursday, 26 August 2010 15:59:46 UTC

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