Skip to content

[css-display-3] Specify who establishes initial formatting context  #6708

Closed
@rosshjb

Description

@rosshjb

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions