Bugzilla – Bug 15702
Does the root element establish a block formatting context? (Issue 209)
Last modified: 2012-12-04 00:53:14 UTC
Reported by Anton Prowse, L. David Baron
Does the root element establish a block formatting context? (It was believed to do so in 2002.[http://lists.w3.org/Archives/Public/www-style/2002Nov/0145.html]) According to the current spec, it doesn't seem to if its specified value is 'inline' or 'run-in', for example (in which case its computed value of 'display' is 'block'). Indeed, 9.4.1 seems to explicitly exclude the possibility:
# Floats, absolutely positioned elements, inline-blocks, table-cells,
# table-captions, and elements with 'overflow' other than 'visible'
# (except when that value has been propagated to the viewport)
# establish new block formatting contexts.
However, it does seem like there ought to be an initial block
formatting context since the definition of "block-level box" is roughly "a box which participates in a block formatting context". More starkly, the issue 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
Note that the root element possesses all the characteristic properties
of an element which establishes a BFC, including in relation to margin
Issue 209: http://wiki.csswg.org/spec/css2.1#issue-209
Does the root element establish a new block formatting context?
The root element participates in a block formatting context
established by the initial containing block.
Open. =errata= Deferred to Errata
It was decided at the Paris F2F 2012 that the root element doesn't establish a block formatting context, but that there is an initial block formatting context (probably associated to the initial containing block).