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

>Your manual definition in (b) enforces "another element" and thus prevents the margins of a parent from collapsing through a child.

Yes, I mentioned that case in my first message. It can be added as case (c):

"Collapse through": Margins are said to collapse through if either:

a) The top and bottom margins of the same element collapse because the element does not establish a new block formatting context, has a computed min-height of zero, a computed height of zero or auto, and contains no in-flow children.

or

b) The margin-top of one element and the margin-bottom of another element adjoin the combined margin of an intermediary element whose margins themselves have collapsed through.

or

c) The margin-top and margin-bottom of the same element adjoin the combined margin of an intermediary child element whose margins themselves have collapsed through.

>But anyways, I think you aren't focusing on the relevant thing. 

What do you mean? I’m trying to understand the term "collapsed through," but there’s no definition for it. That’s the core of the issue—if @SelenIT hadn’t described it to me, we would have been continuously talking past each other.

>It's when you have a specific element when you care whether surrounding indeterminate margins can collapse through this element.

Isn’t that exactly what my example demonstrates? :)

-- 
GitHub Notification of comment by gitspeaks
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11306#issuecomment-2511549125 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 13:29:26 UTC