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

>> 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?
>
> I believe this is correct. However this was decided very recently and only 
> put in the ED yesterday, so I wouldn’t be surprised if implementations 
> have not caught up yet.

That's fair enough. I didn't notice the date on that draft. In the January 
thread there was talk of including the changes in Firefox 19 which made me 
think they might have been further along.

>> 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?
>
>
> http://www.w3.org/TR/css3-mediaqueries/#width says:
>> For continuous media, this is the width of the viewport (as described
>> by CSS2, section 9.1.1 [CSS21]) including the size of a rendered
>> scroll bar (if any).
>
> In my understanding of "including", adding a scrollbar (which makes 
> :root{width:100%} smaller) does not change the value of 'width' in MQs. In 
> other words, I think this is a bug in WebKit.

Thanks for the confirmation. Been looking through WebKit Bugzilla, and it 
looks like this was reported as a bug nearly 5 years ago.

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

Regards
James

Received on Wednesday, 6 March 2013 18:09:29 UTC