User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8) Gecko/20100101 Firefox/4.0b8 Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8) Gecko/20100101 Firefox/4.0b8 Refer to an example at http://oli.jp/bugs/mozilla/flexbox-margin-collapsing.html Reproducible: Always Actual Results: the margins of an element using display: box to trigger flexible box layout don’t collapse with the margins of surrounding elements Expected Results: margins should collapse as usual
Yeah, the margin-collapsing code all lives in nsBlockFrame. This is basically the same as bug 87277.
Based on comment 1, should this be duped?
Created attachment 546312 [details] three box siblings (In reply to comment #1) > Yeah, the margin-collapsing code all lives in nsBlockFrame. This is > basically the same as bug 87277. I don't think it is the same issue. If you look at my testcase, you can see that we treat -moz-box like an inline-block, while WebKit and IE treat it like a block box. Also, unlike bug 87277 this issue won't be fixed by bug 659828. I can't tell who's right.
Just FYI this is regarding OLD Flexbox (display: box;), not NEW Flexbox (display: flex;), and the chances of it being fixed are probably not great. For more background: https://bugzilla.mozilla.org/show_bug.cgi?id=625694
If I read bug 625694 correctly, this bug is either Invalid (since whatever -moz-box does is intended) or Won'tFix (since whatever -moz-box does is being relied on), is it not? I'd like to add some margin-collapsing tests for -moz-box (in bug 477462), and if there is no bug, I won't mark those test failing. Is -moz-box going to go away anytime soon, as hinted in bug 625694?
> Is -moz-box going to go away anytime soon In general no, but for websites, hopefully yes...
Also please remember to update the “[Mastering margin collapsing](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing)” article. In this article, there is no mention of whether the vertical margins of an element with `display: flex;` should/should not collapse with the vertical margins of its first and last child (as of 2016-07-12 they still do not collapse). This information should be explicitly added to the article to reduce confusion.