W3C home > Mailing lists > Public > www-style@w3.org > March 2013

[css3-values] Interaction of vw/vh and scrollbars

From: James Holderness <j4_james@hotmail.com>
Date: Wed, 6 Mar 2013 16:00:58 +0000
Message-ID: <BLU0-SMTP29023C4738087F748F960C7BEE40@phx.gbl>
To: <www-style@w3.org>
I've been looking at the way viewport-percentage lengths are implemented, 
and I was surprised to find that when scrollbars are visible, their behavior 
doesn't match that of percentage width and height on the root element.

I understand that this was discussed at some length earlier this year, and 
it seems this behavior was agreed upon, but with an exception for certain 
values of overflow. However, the wording in the current editor's draft isn't 
very clear to me.

Am I correct in thinking the existing browser behavior (ignoring the 
presence/absence of scrollbars in their calculations) is correct if the 
overflow is 'auto', but if the overflow is anything else (although I don't 
see how anything other than 'scroll' would make any difference) they should 
take the scrollbars into account, and report a smaller width/height?

Also, in the January discussions, I recall someone saying that this 
interpretation of the viewport size matched that of media queries. However, 
having tested a couple of browsers they certainly don't all behave the same 
way for that. On Firefox and Opera, the appearance of a scrollbar does not 
effect the width/height used in media queries, but on Chrome (25.0.1364.97) 
it does. Is that a bug in WebKit?

Regards
James
Received on Wednesday, 6 March 2013 16:01:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT