Bug 28351 - Columns don’t care about their children’s margins
Summary: Columns don’t care about their children’s margins
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P3 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-15 21:32 PDT by Chasen Le Hara
Modified: 2013-02-20 16:12 PST (History)
2 users (show)

See Also:


Attachments
Test case that shows the bug (492 bytes, text/html)
2009-08-15 21:35 PDT, Chasen Le Hara
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chasen Le Hara 2009-08-15 21:32:34 PDT
When a child of a multi-column element has a top margin, that margin pushes the child down even if the child is at the very top of the column.

I don’t know if this is a bug, but Mozilla’s handling of this situation is preferable: it simply gets rid of the margin and makes the text in all of the columns line up at the top.
Comment 1 Chasen Le Hara 2009-08-15 21:35:10 PDT
Created attachment 34917 [details]
Test case that shows the bug

This test case shows the “bug.” In nightly WebKits, the second paragraph doesn’t line up at the top with the first paragraph.

Mozilla’s handling is preferable because I don’t really care about the top margin of the second paragraph; having it line up with the first paragraph is what I really want.
Comment 2 Martin Rauscher 2011-03-11 06:00:19 PST
This is not about what you care. This is about the specification, which clearly states: 
"A top margin set on the first child element of a multicol element will not collapse with the margins of the multicol element."
http://www.w3.org/TR/css3-multicol/#the-multi-column-model

What is absolutely sensible. Because how would you achieve that effect otherwise? You'd have to introduce another element. And why would you set a top margin if you don't want it in the first place?

This is clearly a bug. And in Mozilla, too:
https://bugzilla.mozilla.org/show_bug.cgi?id=388666
https://bugzilla.mozilla.org/show_bug.cgi?id=616722

The current Opera snapshots handle this right.
Comment 3 Dave Hyatt 2013-02-20 16:12:02 PST
Our behavior is correct according to the spec.