Re: [csswg-drafts] [CSS2] Clarify margin collapsing behavior (#11306)

> Given an element E, we say that margins can collapse through E if the top margin of E is adjoining the bottom margin of E (i.e., margins within the same element).

Yes.

> Given an element E, we say that margins can collapse through E if the top margin of E adjoins some margin external to E and the bottom margin of E adjoins another margin external to E.

No, this condition is not sufficient. Counterexample: element that establishes an independent formatting context.

> A collapsed margin is considered adjoining to another margin M if any of the component margins of the collapsed margin is adjoining to M.

Yes

> What exactly are the "component margins" of a collapsed margin? Does this simply refer to the individual margins that participated in the collapse?

Yes

> margin M adjoins a collapsed margin if M adjoins one of the margins that contributed to the collapse?

Yes

> how does this establish the condition for M "collapsing through" the collapsed margin?

Already said. If an element allows its top and bottom margins to be adjoining, then we say that margins collapse through the element.


-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11306#issuecomment-2512984755 using your GitHub account


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

Received on Monday, 2 December 2024 21:44:54 UTC