[csswg-drafts] [css2.2] Suggestion: Add note clarifying root element's margin collapse behavior (#12528)

kannanwisen has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css2.2] Suggestion: Add note clarifying root element's margin collapse behavior ==
ello CSS Working Group,

In the CSS 2 specification (and inherited by the Box Model module), section 8.3.1 lists "Margins of the root element’s box do not collapse" as a primary exception to margin collapse.

While this rule is correct, its relationship to the general concept of a Block Formatting Context (BFC) is not immediately obvious, and this can be a point of confusion for developers trying to build a consistent mental model.

**Suggestion**

It would be very helpful to add an informative note to this section that explicitly connects the root element's behavior to the well-defined margin-containment property of all BFCs.

This would clarify that the root element is not an arbitrary exception, but rather the first and most foundational example of a BFC in action.

An example of what this note could look like:

    **Note:** The root element establishes the document's initial Block Formatting Context. Its behavior of not collapsing its margins with its descendants is a specific instance of the general principle that any BFC contains the margins of its in-flow children.

Adding this context would significantly improve the specification's clarity for those learning how these fundamental layout mechanics interrelate.

Thank you for your consideration.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12528 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 26 July 2025 04:14:13 UTC