Re: [csswg-drafts] [css2] Browsers disagree on margin collapsing when element’s height > content

It seems that Chrome etc. behave according [to the current CSS2.x spec draft](https://drafts.csswg.org/css2/box.html#collapsing-margins):

> The bottom margin of an in-flow block box with a 'height' of 'auto' collapses with its last in-flow block-level child's bottom margin, if:
> - the box has no bottom padding, and
> - the box has no bottom border, and
> - the child's bottom margin neither collapses with a top margin that has clearance, nor (if the box's min-height is non-zero) with the box's top margin.

In your examples, the bottom margin of the paragraph doesn't collapse with the top margin of the container, thus all three conditions are true and the bottom margins should collapse (though it's not very intuitive).

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

Received on Saturday, 6 January 2018 17:03:56 UTC