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

[csswg-drafts] [css-multicol] Inconsistency with margin collapsing across columns

From: Jen Simmons via GitHub <sysbot+gh@w3.org>
Date: Mon, 06 Nov 2017 01:56:49 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-271337936-1509933408-sysbot+gh@w3.org>
jensimmons has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-multicol] Inconsistency with margin collapsing across columns  ==
Imagine you have a series of paragraphs, wrapped in an article element. 
Each paragraph has a 1em margin above and below, `p {margin: 1em 0;}`. 
You apply `columns: 4` to the `<article>`, creating four columns of paragraphs. 
Demo: https://codepen.io/jensimmons/pen/OOXXvW

The problem: in the first column, the paragraph does not have a collapsing top margin, so the paragraph is pushed down 1em. In the other columns, the margin does collapse. Plus, we don't really have interop across browsers for this behavior.

(In the demo, I've applied `break-inside: avoid;` as well to get the paragraphs to start at the beginning of a column. Feel free to remove it to see how things behave differently without it.)

It would make much more sense for margins to collapse in all columns, imo. If we decide we must have margins not collapsing in the first column, then we should at least make that consistent across all columns.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1939 using your GitHub account
Received on Monday, 6 November 2017 01:56:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 6 November 2017 01:56:52 UTC