Re: [csswg-drafts] [css2][css-flow][css-sizing] How do min/max block sizes affect bottom margin collapse with last child? (#12218)

So the most obvious change would be:

```html
<!DOCTYPE html>
<style>
.wrapper { display: inline-block; vertical-align: top; border: 5px solid; margin-bottom: 10px }
.test { outline: 5px dotted magenta; }
.test::before { content: ""; display: block; width: 50px; height: 20px; margin-bottom: 30px; background: cyan }
</style>
<div class="wrapper"><div class="test" style="height: 20px"></div></div>
```

| Current | New |
| - | - |
| <img width="72" height="70" src="https://github.com/user-attachments/assets/880f723b-6abf-48ac-9c26-5a581e759d82" /> | <img width="72" height="70" src="https://github.com/user-attachments/assets/8be36e58-fa29-46b3-a7aa-4fcb601b6e1f" /> |

Sounds good to me if it's web compatible.

But if we compatibility requires extrinsic `height` to prevent collapsing bottom margins, then I think intrinsic sizes should include content's end margins, just like when a non-zero `padding-bottom` prevents collapsing bottom margins. That's where current Blink and [Servo#36322](https://github.com/servo/servo/pull/36322) differ.

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


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

Received on Wednesday, 24 September 2025 02:01:43 UTC