Re: [css3-values] viewport units (v*) and zoom

On Mon, Aug 20, 2012 at 6:28 PM, François REMY
<fremycompany_pub@yahoo.fr> wrote:
> Indeed, you just discovered what an implementation bug. This implementation
> bug occurs when the 'v*' units are converted to pixels in a font-size
> declaration.

Ah, interesting.

> Here's a reduced test case for the problem:
>
> <!doctype html>
> <html>
>    <head>
>        <title>Invalid VM/VH to PX conversion in FONT-SIZE only</title>
>
>        <style>
>
>            html, body { margin: 0px; padding: 0px; }
>            html { font-size: 100vh; line-height: 0px; overflow: hidden;
> background: darkred; }
>            div { position: absolute; top: 0px; }
>            #vh { height: 100vh; width: 100vw; background: red; }
>            #em { height: 1rem; font-size: 100vw; width: 1em; background:
> lime; }
>
>        </style>
>    </head>
>    <body>
>        <!-- set this page at 50% zoom level; you should not see any red on
> this page -->
>        <div id="vh"></div>
>        <div id="em"></div>
>    </body>
> </html>

You're definitely better than me at designing minimal test cases ;-)

> It seems there's already a webkit bug open for this issue:
> https://bugs.webkit.org/show_bug.cgi?id=87846 (maybe you want to +1 it).

Thanks, I'll follow it.

> If you are ok with this, I can report the bug on Connect for IE (I'll link this
> conversation).

Please do. According to this page http://caniuse.com/viewport-units
the viewport units are "not supported" for setting font size, so it
might be a known issue already (although my little experimentation
actually showed that the font-size _is_ set, although incorrectly).

> Nice find,
> François

Thanks a lot for the assistance,

-- 
Giuseppe "Oblomov" Bilotta

Received on Monday, 20 August 2012 16:58:00 UTC