Bug 156687 - px, em, rem should behave the same in media queries when page zoom is applied
Summary: px, em, rem should behave the same in media queries when page zoom is applied
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Macintosh OS X 10.11
: P2 Normal
Assignee: Nobody
URL: http://codepen.io/cvrebert/pen/KzRXJd
Keywords: HasReduction, InRadar
Depends on:
Blocks: 159753
  Show dependency treegraph
 
Reported: 2016-04-18 00:47 PDT by Chris Rebert
Modified: 2018-10-15 15:36 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rebert 2016-04-18 00:47:46 PDT
Steps to reproduce:
1. Open http://codepen.io/cvrebert/pen/KzRXJd in Safari/WebKit.
2. Click the "Change View" button.
3. A menu appears.
4. Under "Editor Layout", click the first button on the left.
5. Click the "Change View" button again to dismiss the menu.
6. Zoom in on the page in Safari/WebKit (View->Zoom In, ⌘+)
7. Resize the output pane by dragging the separator on the left edge of the output pane.

Actual results:
As you resize the output pane, the red, green, and blue bars become translucent or opaque at different widths.

Expected results:
As you resize the output pane, the red, green, and blue bars should
all become translucent or opaque together at the same time when passing a particular width boundary point.
This is the behavior exhibited by Chrome, Firefox, and MS Edge when their page zoom features are activated on said testcase webpage.

Though non-pinch page zooming is not currently standardized AFAICT, this deviation from other browsers hurts interoperability
and offers an unfortunate reason to avoid px-based media queries. See also http://zellwk.com/blog/media-query-units/#2-user-zooms-in
Note that the 3 media queries all compute to the same width value under default, non-zoomed circumstances.
Comment 1 Radar WebKit Bug Importer 2016-04-18 08:38:49 PDT
<rdar://problem/25778630>