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
{{ message }}
Repository navigation
[css2.2] Ambiguity in "participate in a block formatting context" definition #12529
This issue is to discuss a potential ambiguity in the definition of "Block-level boxes" in the CSS 2 specification, section 9.2.
The current text states:
Block-level boxes are boxes that participate in a block formatting context.
In this sentence, the entire phrase "block formatting context" is hyperlinked to section 9.4.1, which defines the specific rules for an element that establishes a new BFC (e.g., containing floats, stopping margin collapse).
The Point of Confusion
This structure is misleading because it implies that all block-level boxes adhere to the special rules of a BFC root. In reality, the vast majority of block-level boxes simply participate in an existing BFC inherited from an ancestor. The special rules defined in 9.4.1 do not apply to them.
This can lead a developer to incorrectly assume that any simple <div> or <p> should, for example, contain floats, which is not the case.
Proposal for Clarification
To resolve this ambiguity, I suggest refining the definition to explicitly distinguish between participating in an existing BFC and establishing a new one, and to make the hyperlink more precise.
The proposed new sentence would be:
Block-level boxes are boxes that either participate in an existing block formatting context or establish a new [block formatting context]( http://drafts.csswg.org/css2/#block-formatting).
This change is effective because:
It accurately identifies the two distinct roles a block-level box can have.
It correctly links only the phrase "a new block formatting context" to the section defining the special rules that apply in that specific case.
This would provide a much more accurate mental model for developers from the outset.
To clarify the original intent of this issue: my focus is not on the phrase "Block-level boxes are boxes," even though the original text contains this phrase.
My focus is on the ambiguity of the phrase "participate in a block formatting context" as it is used in the current text.
The core problem is that this general phrase is hyperlinked directly to section 9.4.1, which details the specific rules for establishing a new BFC. This structure can easily lead a reader to the incorrect conclusion that any block box that is merely "participating" will also, for example, contain floats—even a simple div element.
My goal is to address this potential for misinterpretation caused by the hyperlink. The initial suggestion to rewrite the sentence was just one possible approach, but the fundamental issue is with the link's destination.
ambiguity of the phrase "participate in a block formatting context" as it is used in the current text.
The core problem is that this general phrase is hyperlinked directly to section 9.4.1
No. The link is not for "participate in a block formatting context", it's just for "block formatting context". So the link destination is just explaining BFCs (including how they are established).
ambiguity of the phrase "participate in a block formatting context" as it is used in the current text.
The core problem is that this general phrase is hyperlinked directly to section 9.4.1
No. The link is not for "participate in a block formatting context", it's just for "block formatting context". So the link destination is just explaining BFCs (including how they are established).
The specification says:
In a block formatting context, boxes are laid out one after the other, vertically, beginning at the top of a containing block. The vertical distance between two sibling boxes is determined by the margin properties. Vertical margins between adjacent block-level boxes in a block formatting context collapse.
Activity
Loirooriol commentedon Jul 27, 2025
I fail to see how you are interpreting "participates in a BFC" as "establishes a BFC". They are clearly different.
Your definition is wrong, e.g. an inline-block establishes a new BFC but is not block-level.
kannanwisen commentedon Jul 28, 2025
To clarify the original intent of this issue: my focus is not on the phrase "Block-level boxes are boxes," even though the original text contains this phrase.
My focus is on the ambiguity of the phrase "participate in a block formatting context" as it is used in the current text.
The core problem is that this general phrase is hyperlinked directly to section 9.4.1, which details the specific rules for establishing a new BFC. This structure can easily lead a reader to the incorrect conclusion that any block box that is merely "participating" will also, for example, contain floats—even a simple div element.
My goal is to address this potential for misinterpretation caused by the hyperlink. The initial suggestion to rewrite the sentence was just one possible approach, but the fundamental issue is with the link's destination.
Loirooriol commentedon Jul 28, 2025
No. The link is not for "participate in a block formatting context", it's just for "block formatting context". So the link destination is just explaining BFCs (including how they are established).
kannanwisen commentedon Jul 28, 2025
The specification says:
In a block formatting context, boxes are laid out one after the other, vertically, beginning at the top of a containing block. The vertical distance between two sibling boxes is determined by the margin properties. Vertical margins between adjacent block-level boxes in a block formatting context collapse.