-
Notifications
You must be signed in to change notification settings - Fork 715
[css-display-3] The definition of BFC does not include flex item #5143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The glossary in the spec seems to differentiate the strict definition of the 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 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 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 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. |
We are talking about the "very loosely" definition. A flex item is blockified and gets a |
@SelenIT FFC is BFC with flex layout, they are not the same, I know, and I don't think other CSS leaners are willing to know that. @Loirooriol
I think I don't have misunderstood the words "one of" and "very loosely" in spec. I mean, I thought the very loosely one will include all the cases. |
That's not what I understood. My understanding was effectively that the very loose definition was excluding inline-block and inline-flex. Which can make sense: the B in BFC is "block", and if it can refer to other formatting contexts than block ones, then it seems to me that it means block-level (or strictly speaking, non-inline-level) formatting context. But I don't know, not a fan of this loose definition, I would remove it and just leave the proper one. BTW, it seems that, instead of BFC, the concept that you want is "independent formatting context". |
ok fine, thanks for your discussion |
quoting something from #1471
if a flex container could establish a "BFC", why flex item cannot?
I suggest to correct the BFC definition
from
to
(someone has added “flex item” without “flex container” to the BFC page on MDN for a long time. I am not sure how to correct that page, that's one reason I come here)
The text was updated successfully, but these errors were encountered: