[Webkit-unassigned] [Bug 133271] New: vw units not calculated properly when scrollbars are present and overflow is not auto

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 25 18:14:54 PDT 2014


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

           Summary: vw units not calculated properly when scrollbars are
                    present and overflow is not auto
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: patrick.arlt at gmail.com


In Safari 7+ if you Mac is set to always show scroll bars vw units are calculated againt the area of the screen that includes scrollbars.

The CSS spec http://dev.w3.org/csswg/css-values/#viewport-relative-lengths says that "when the value of overflow on the root element is auto, any scroll bars are assumed not to exist." and "Note that the initial containing block’s size is affected by the presence of scrollbars on the viewport."

So if I set the overflow property on the <html> element to something like overflow:scroll it should exclude the width of the scrollbar for the vw unit.

In my attached reproduction case with scrollbars always enabled (http://osxdaily.com/2011/08/03/show-scroll-bars-mac-os-x-lion/) the 2 divs should have equal widths but do not.

This also appears to be a bug in chromium/blink which I filed here https://code.google.com/p/chromium/issues/detail?id=377331.

Firefox implements the spec correctly.

IE 11 also has this bug.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list