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

> The margins adjoin the combined margin of an intermediary child element

No, it doesn't need to be one child. There can be multiple children.

> No, the margin-bottom: 120px of the first div does not collapse through the combined margin-top: 60px of div.collapsed when it collapses with the margin-top: 10px of the third div.

I haven't said that. `div.collapsed` allows margins to collapse through it. And the `margin-bottom: 120px` and `margin-top: 10px` definitely collapse.

Again, a box allowing "margins to collapsing through" is something that you check on the box because it's relevant for the position of the box. If you have a pair of margins M1 and M2 what you care about is whether they collapse together, not whether they are collapsing through some element.

Sure, you could say that two margins M1 and M2 collapse through a box B if B allows margins to collapse through, and M1 and M2 are adjoining to B's margins. And maybe also require one of M1 and M2 to precede B in tree order, and the other to appear afterwards in tree order. But what's the point?

Anyways this is just going in circles as usual so I'm closing it as question answered.

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


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

Received on Tuesday, 3 December 2024 13:47:39 UTC