<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>156687</bug_id>
          
          <creation_ts>2016-04-18 00:47:46 -0700</creation_ts>
          <short_desc>px, em, rem should behave the same in media queries when page zoom is applied</short_desc>
          <delta_ts>2022-09-01 04:26:46 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.11</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=156684</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=41063</see_also>
          <bug_file_loc>http://codepen.io/cvrebert/pen/KzRXJd</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>159753</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Rebert">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>danburzo</cc>
    
    <cc>kaelig</cc>
    
    <cc>rik</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1184596</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2016-04-18 00:47:46 -0700</bug_when>
    <thetext>Steps to reproduce:
1. Open http://codepen.io/cvrebert/pen/KzRXJd in Safari/WebKit.
2. Click the &quot;Change View&quot; button.
3. A menu appears.
4. Under &quot;Editor Layout&quot;, click the first button on the left.
5. Click the &quot;Change View&quot; button again to dismiss the menu.
6. Zoom in on the page in Safari/WebKit (View-&gt;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1184683</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-04-18 08:38:49 -0700</bug_when>
    <thetext>&lt;rdar://problem/25778630&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574395</commentid>
    <comment_count>2</comment_count>
    <who name="Dan Burzo">danburzo</who>
    <bug_when>2019-09-26 02:29:15 -0700</bug_when>
    <thetext>This is still a problem in Safari Technology Preview 13.1 on macOS, but seems to have been fixed on iOS/ipadOS 13. 

Safari on macOS continues to factor in the zoom ratio into em and rem units for Media Queries.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574400</commentid>
    <comment_count>3</comment_count>
    <who name="Dan Burzo">danburzo</who>
    <bug_when>2019-09-26 02:48:32 -0700</bug_when>
    <thetext>(In reply to Dan Burzo from comment #2)
&gt; This is still a problem in Safari Technology Preview 13.1 on macOS, but
&gt; seems to have been fixed on iOS/ipadOS 13. 
&gt; 
&gt; Safari on macOS continues to factor in the zoom ratio into em and rem units
&gt; for Media Queries.

However nonsensical these types of media queries might be, the problem also applies to viewport-relative units such as `vw`.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>