Re: [csswg-drafts] [css-display-3] The definition of BFC does not include flex item (#5143)

The glossary in the spec seems to differentiate the strict definition of the [block formatting context](https://drafts.csswg.org/css-display/#block-formatting-context) and the informal, colloquial term "BFC" that is often used in a broad sense "anything that always contains nested floats and margins of descendants, unlike usual `display: block flow` boxes".

In the strict sense, a flex container can't be said of that it "establishes the block formatting context", since it establishes the flexbox formatting context instead. In the broad sense, one could say that the flex container doesn't let nested floats out because "it is a BFC" (as a shorter way to express that these floats are actually contained by the block formatting context established by flex items). That said, I agree that this abbreviation is not often used in this sense (as [mentioned](https://github.com/w3c/csswg-drafts/issues/1471#issuecomment-313266528) in the related issue) and adding this "very loose" meaning to the list might be confusing.

Regarding flex items (and grid items as well), I believe they fall under the first meaning, "a [block container](https://drafts.csswg.org/css-display/#block-container) that establishes a new block formatting context for its contents". So I believe that current MDN page is correct saying that flex items establish the _block formatting context_ (in a strict sense) while flex containers don't. However, I edited that page to clarify that flex/grid items establish the block formatting context only if they are block containers themselves, not flex or grid or table containers.

-- 
GitHub Notification of comment by SelenIT
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5143#issuecomment-637538249 using your GitHub account

Received on Tuesday, 2 June 2020 13:21:24 UTC