Closed Bug 692779 Opened 13 years ago Closed 13 years ago

Zooming out breaks some layouts

Categories

(Core :: Layout, defect)

8 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: me, Unassigned)

Details

Attachments

(2 files)

Attached file 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)
Attached file 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
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: