Skip to content

[css2.2] Ambiguity in "participate in a block formatting context" definition #12529

@kannanwisen

Description

@kannanwisen

Hello CSS Working Group,

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:

  1. It accurately identifies the two distinct roles a block-level box can have.
  2. 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.

Thank you for your time and consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions