Skip to content

Definition of "Block-level box" in CSS2 Specification #11126

@gitspeaks

Description

@gitspeaks

Context:

The CSS2 specification at section 9.4.1 "Block Formatting Contexts" references the term "block boxes" and implies conditions under which a block formatting context is established. The definition states:

"Floats, absolutely positioned elements, block containers (such as inline-blocks, table-cells, and table-captions) that are not block boxes, and block boxes with 'overflow' other than 'visible' (except when that value has been propagated to the viewport) establish new block formatting contexts for their contents."
See Section 9.4.1

In Section 9.2.1, “block boxes” are defined as follows:

"Block-level boxes that are also block containers are called block boxes."
See Section 9.2.1

Clarification Needed:

  1. Circular Definition of "Block-level box":

    • Section 9.2.1 states that "Block-level boxes are boxes that participate in a block formatting context," which implies that the status of being a "block-level box" depends on an ancestor's formatting context.

    • However, if a block box (e.g. a block-level box) establishes a new block formatting context, it raises a potential circular definition: is a box’s participation in a block formatting context both a cause and an effect of being a "block-level box"? In other words, which comes first: being a "block-level box" or participating in a block formatting context?

    • Additionally, what happens to the principal block-level box of a block-level element if that element is referenced within an inline formatting context? Does it still maintain the properties of a block-level box in this case, or is its block-level status altered by its context within the inline formatting context

  2. Block-level Boxes as Block Containers:

    • The specification states: "a block-level box is also a block container box," but further states that "Block-level boxes that are also block containers are called block boxes."

    • The use of "also" suggests that there could be "block-level boxes" that are not "block containers," which contradicts the earlier statement that block-level boxes are inherently block containers. Could clarification be provided on whether "block-level boxes" are always "block containers," or only in certain contexts (e.g., only when containing descendants)?

  3. Is it correct to assume that a principal block-level box implicitly establishes a block formatting context, even in the absence of specific formatting context triggers (like float or absolute positioning)?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSS2Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.css-display-3Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions