Viewport-units vw / vh does not work as expected when non-100% increase in Safari on OS X

I'm having problems installing vw and vh on Safari OSX.

Take this code as an example:

 <body style="margin: 0;"> <div style="background: red; height: 100vh; width: 100vw;"></div> </body> 

With 100% scaling, it works great. However, if you zoom out, Chrome and Firefox (in this example) still display a red div throughout the page. On the other hand, Safari seems to be rendering, as if vw and vh are being calculated against the viewport with a magnification of 100%.

Is this the expected behavior or is this what Safari does differently for other browsers? Are there other browsers that display vw and vh in the same way?

+6
source share
2 answers

As I know, only Safari has recount problems. See this page for more known issues with this property: http://caniuse.com/#feat=viewport-units .

+1
source

This was a bug in Safari, which was reportedly closed in November 2017. It is unclear whether it will fall into Safari 12 or not.

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

Changes: https://trac.webkit.org/changeset/225277/webkit

0
source

All Articles