You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The term "block container" is misleading. CSS 2.1 defines it as
A block container box either contains only block-level boxes or establishes an inline formatting context and thus contains only inline-level boxes.
However, the name seems to suggest that it can only contain block-level boxes. Probably, that's why CSS Display wrongly (#1185) defines it as
A box whose contents participate in a block formatting context.
So maybe the notation should change. Something like
flow container: either a block container or an inline formatting context root.
block container: a box whose contents participate in a block formatting context. [...]
inline formatting context root: box that establishes a new inline formatting context for its contents.
block box: a block-level box that is also a flow container.
<display-inside>: flow: If its outer display [...]. Otherwise it generates a flow container box. [...] It either establishes a new block or inline formatting context for its contents, or integrates its contents into its parent formatting context.
<display-inside>: flow-root: The element generates a flow container box [...]. It always establishes a new block formatting context for its contents.
This would be more consistent with the flow and flow-root keywords.
We agree that "flow container" would probably have been a better term to use originally, but at this point "block container" is used reasonably widely across CSS specs, so we probably shouldn't change it.
It's also a little more familiar for authors to link up "X container" to "display: X", which holds with "block container", but not "flow container" (because "display: X flow" can use either inline or block for the X).
Yes, I also noticed that "flow container" wouldn't be consistent with display: block. I was thinking about some alternative proposal about requiring the contents of a block container to always be block-level (as the name implies), wrapping sequences of inline-levels inside a block-level inline container, which would be what establishes the inline formatting context. But this would be a new kind of box, and even only allowing it for anonymous ones would have its own problems, so maybe it's better as it is now.
It's also a little more familiar for authors to link up "X container" to "display: X", which holds with "block container", but not "flow container" (because "display: X flow" can use either inline or block for the X).
Personally, I find the opposite to be true. The connection implied by "X container" to "display: X" in this case is actually quite confusing—it trips me up, especially when an inline-block element is designated as a block container. Using the term "Flow Container" feels more intuitive, as it suggests a broader category of element display designations which include list-item without implying a specific designation.
Activity
tabatkins commentedon May 15, 2017
We agree that "flow container" would probably have been a better term to use originally, but at this point "block container" is used reasonably widely across CSS specs, so we probably shouldn't change it.
It's also a little more familiar for authors to link up "X container" to "display: X", which holds with "block container", but not "flow container" (because "display: X flow" can use either inline or block for the X).
Loirooriol commentedon May 16, 2017
Yes, I also noticed that "flow container" wouldn't be consistent with
display: block. I was thinking about some alternative proposal about requiring the contents of a block container to always be block-level (as the name implies), wrapping sequences of inline-levels inside a block-level inline container, which would be what establishes the inline formatting context. But this would be a new kind of box, and even only allowing it for anonymous ones would have its own problems, so maybe it's better as it is now.gitspeaks commentedon Nov 15, 2024
Personally, I find the opposite to be true. The connection implied by "X container" to "display: X" in this case is actually quite confusing—it trips me up, especially when an inline-block element is designated as a block container. Using the term "Flow Container" feels more intuitive, as it suggests a broader category of element display designations which include
list-itemwithout implying a specific designation.