Zooming out breaks some layouts

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
7 years ago
7 years ago

People

(Reporter: aljullu, Unassigned)

Tracking

8 Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
Created attachment 565527 [details]
example.htm

See example.htm:

We have a wrapping div (gray) with a width of 304px. Inside it there are two other div (red and green) floating left with a width of 150px and a border of 1px.

In normal zoom you cannot see the wrapping div, it's OK. But if you zoom out (Ctrl -) the two divs inside the wrapper appear one over the other and you can see the gray div.

It think that it should not happen: in many cases this breaks the page layout.

Furthermore:
It does not happen if you use "-moz-box-sizing: border-box" in the inside divs. (see example2.htm)
(Reporter)

Comment 1

7 years ago
Created attachment 565528 [details]
example2.htm
This is presumably happening because borders are snapped to device pixels, right?  So if you zoom out a little bit, the 304 and 150 get smaller in device pixels but the 1 does not, and then things no longer fit...
Attachment #565527 - Attachment mime type: text/plain → text/html
Attachment #565528 - Attachment mime type: text/plain → text/html
Right. This is more or less by design and I don't want to change anything here. The alternatives would make border edges get inconsistent widths (possibly disappearing completely), or else getting nasty antialiasing.

If you know what rendering you want at, say, a zoom of 1.2, you can tweak the CSS to get that. Basically one of the inner elements is going to have to have an auto width.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.