Re: [csswg-drafts] [css-break] "break adjoining margin" needs clarification (#6763)

> let us know which of the elements 1 - 12 have their margin-bottom actually influence the layout

That's impossible to say without knowing which elements contain content, or are empty, and which ones have non-zero padding/border etc.  But there are a few things we can say: for example, [flex container’s margins do not collapse with the margins of its contents](https://drafts.csswg.org/css-flexbox/#flex-containers) so you know that any flex containers won't propagate any of its descendants' margins (ditto for grid containers btw).  The margin-bottom of flex-09 may collapse with its ancestors (block-08, block-07) but that depends on if there's any padding/border in the way.

(Note also that the margin-**top** of item-04, block-06, block-07, block-08, flex-09 may also propagate all the way through, but that only happens if it's actually "adjoining", which only occurs when all the intervening boxes have zero height, no padding/border etc. (i.e. the top/bottom margin of a box collapse when there is zero space between them, aka adjoining). I'm guessing that's not your problem here.)

It would help if you could describe what the actual problem is you are trying to solve, and provide an URL to a fully working testcase that demonstrates that problem. Otherwise, we're very likely to talk past each other because the details matters.


> So should we consider the break to be a "pseudo-margin" and, if so, where in the box tree should it be?

I think you can think of it like this: any margin that propagates out from the end of block-07, or at the start of block-13, is treated as if it doesn't exist.

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


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

Received on Saturday, 30 October 2021 00:48:37 UTC