[csswg-drafts] [css-display-3] Specify who establishes initial formatting context (#6708)

rosshjb has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-display-3] Specify who establishes initial formatting context  ==
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 `div`s 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:

```html
<body>
  <div>1</div>
  <div>2</div>
</body>
```

Certainly, because the `body` only contains block-level elements, these two `div`s 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.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6708 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 2 October 2021 23:33:31 UTC