All users were logged out of Bugzilla on October 13th, 2018

CSS margin incorrectly calculated

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
6 years ago
6 years ago

People

(Reporter: nebupookins, Unassigned)

Tracking

15 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: INVALID?)

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4

Steps to reproduce:

Demo available at http://jsfiddle.net/fZnHV/

If you uncomment the CSS line about the border, this seems to make the issue go away.

This issue might also be related to 451791


Actual results:

The green box has a margin between it and the top of the page


Expected results:

We expect the green box to be positioned at the top of the page.
(Reporter)

Comment 1

6 years ago
I just noticed that you've captured the user agent of the browser used to post the bug.

For what it's worth, the user agent of the browser that exhibits the bug is:

Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1

Comment 2

6 years ago
Created attachment 674224 [details]
testcase showing the bug

Comment 3

6 years ago
Created attachment 674225 [details]
testcase with “border-top: solid black 1px;”, showing no bug

Updated

6 years ago
Component: Untriaged → Layout: Block and Inline
Product: Firefox → Core
Sounds like interaction of margin-collapsing and clearance, given the border dependency.

It's not actually obvious to me from examining the testcase what the correct rendering is, per spec.  But given that WebKit and Presto do the same thing we do, I suspect the rendering you see is correct.
Whiteboard: INVALID?
You need to log in before you can comment on or make changes to this bug.