-
Notifications
You must be signed in to change notification settings - Fork 756
Description
According to https://www.w3.org/TR/css-display-3/#block-container:
A block container either contains only inline-level boxes participating in an inline formatting context, or contains only block-level boxes participating in a block formatting context
When we have only divs in body element, does who establishes initial block/inline formatting context? In this case, i didn't apply any properties like display: flow-root explicitly:
<body>
<div>1</div>
<div>2</div>
</body>Certainly, because the body only contains block-level elements, these two divs participate in block formatting context, and thus we can say that the body is block container, at least.
But the condition which in BFCs are established is as follows( from https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#block-formatting ):
Floats, absolutely positioned elements, block containers (such as inline-blocks, table-cells, and table-captions) that are not block boxes, and block boxes with 'overflow' other than 'visible' (except when that value has been propagated to the viewport) establish new block formatting contexts for their contents.
The example i posted above doesn't satisfy any these cases. So, i think that the spec should contain who establish initial formatting context.