W3C home > Mailing lists > Public > www-style@w3.org > July 2009

Re: [css3-mediaqueries] width/height and viewport scrollbars

From: Řyvind Stenhaug <oyvinds@opera.com>
Date: Fri, 24 Jul 2009 15:38:01 +0200
To: "L. David Baron" <dbaron@dbaron.org>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.uxkqtnsuru61ud@oyvinds-desktop>
On Wed, 01 Jul 2009 00:02:39 +0200, L. David Baron <dbaron@dbaron.org>  

> On Thursday 2009-06-11 18:35 +0200, Řyvind Stenhaug wrote:
>> The descriptions of the 'width' and 'height' media features should
>> perhaps clarify whether or not viewport scrollbars are included. It  
>> seems
>> that the presence of scrollbars makes no difference on Minefield
>> (Gecko/20090610) while it does in Safari 4 public beta.
> Removing the space occupied by viewport scrollbars for the values of
> 'width' and 'height' seems like a pretty clear bug to me.

Well, an interpretation of the specs as written may result in that  
conclusion. The ICB "has the dimensions of the viewport" (CSS2.1 10.1),  
and the space taken up by an element's scrollbars is subtracted from the  
containing block it forms (CSS2.1 11.1.1, though again the viewport as a  
special (non-"element") case doesn't seem to be mentioned).

But I'm not arguing that the space should be removed (our internal builds  
don't do that either).

> There are
> already ways for style sheets to affect whether there are scrollbars
> on the viewport, so we really shouldn't make whether there are
> scrollbars on the viewport affect which style sheets are chosen.
> (If we do, then we need to give the rules for how to end the
> resulting infinite loops.)

Yes. I noticed some text in section 2 saying that "[t]o avoid circular  
dependencies, it is never necessary to apply the style sheet in order to  
evaluate expressions", mentioning an example of using "the default aspect  
ratio", but I'm not sure how to interpret it in such a situation. (Lay out  
the document without the style sheet first to see if the viewport gets  
scrollbars? That doesn't seem good. Use the "default" width/height, i.e.  
the viewport dimensions as they would be for an empty document? That would  
be equivalent to Gecko's behavior.)

I see that a similar case came up in a later thread,  
http://lists.w3.org/Archives/Public/www-style/2009Jul/0021.html (vw/vh/vm  

Řyvind Stenhaug
Core Norway, Opera Software ASA
Received on Friday, 24 July 2009 13:38:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:27 UTC