Re: [csswg-drafts] [css-box] Explicit control over margin collapsing (#1324)

The inconsistent handling of margin collapsing adds another level of complexity to the majority of projects. Elements such as headers, paragraphs, subheaders - their spacing should ideally be consistent no matter how they're laid out. 

I agree we don't want collapsing margins in grid or flex. It's just a strange result. 

What I would _love_ to be able to do is disable margin collapsing in the normal css box model - so spacing is consistent no matter the layout method. 

There's lots of workarounds for this, overflows, :after's, clearfixes, just not using box model full stop, not using margins and only using padding - but they're all sketchy hacks with trade offs. 

If I could start every project with:

    box-sizing: border-box;
    margin-collapse: seperate;

I'd be stoked. 

GitHub Notification of comment by EliotSlevin
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Thursday, 26 November 2020 23:54:07 UTC