[Webkit-unassigned] [Bug 178261] New: CSS min-width and max-width media features should not round fractional pixel values

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 13 07:40:20 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=178261

            Bug ID: 178261
           Summary: CSS min-width and max-width media features should not
                    round fractional pixel values
           Product: WebKit
           Version: Safari 11
          Hardware: iPhone / iPad
                OS: iOS 11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sime.vidas at gmail.com

These two media queries both evaluate to `true` in the latest Safari on an iPhone 6:

@media (max-width: 374.99px) {
  p::before {
    content: "đź‘Ť";
  }
}

@media (min-width: 375px) {
  p::after {
    content: "đź‘Ť";
  }
}

Live demo: https://output.jsbin.com/tafogug/quiet

This doesn’t make sense. The viewport width cannot at the same time be ≤ 374.99px and ≥ 375px. WebKit seems to round the fractional pixel value. Why?

Note that this behavior is preventing the postcss-media-minmax plugin from properly polyfilling “range mode” media queries. See: https://github.com/postcss/postcss-media-minmax/issues/19.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171013/e5d22ae8/attachment.html>


More information about the webkit-unassigned mailing list