W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2017

Re: [csswg-drafts] [css-box] Explicit control over margin collapsing

From: SelenIT via GitHub <sysbot+gh@w3.org>
Date: Thu, 11 May 2017 10:37:53 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-300751447-1494499071-sysbot+gh@w3.org>
I generally don't like the idea of introducing margin collapsing concept into contexts other than block layout and prefer the idea of the `*-gap` property for everything (maybe even for paragraphs, _instead_ of collapsed margins, in order to distribute paragraphs regularly, while margins can still be used to tweak this distribution).

Margin collapsing already seems one of the weirdest CSS features for beginners, and edge cases like 'collapsing-through' zero-height blocks, overlapping [of collapsed margin and the clearance created after the cleared float](http://jsfiddle.net/o9rbryxp/2/) etc. can confuse even more experienced authors. Also,  introducing margin collapsing to 2D layout contexts like Grid would cause to take many elements into account to calculate each margin, wouldn't it potentially harm the performance? And how are the collapsed margins supposed to interact with existing grid gutters? Should they collapse through them? I am afraid that introducing the concept of margin collapsing into Grid (and probably Flexbox too) would bring too many issues like that.

-- 
GitHub Notification of comment by SelenIT
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1324#issuecomment-300751447 using your GitHub account
Received on Thursday, 11 May 2017 10:37:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 10:12:53 UTC