W3C home > Mailing lists > Public > www-style@w3.org > December 2012

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

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Tue, 4 Dec 2012 17:54:52 +0000
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: James Robinson <jamesr@google.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F0178291BEAB257@TK5EX14MBXC221.redmond.corp.microsoft.com>
[Boris Zbarsky:]

> 
> On 12/4/12 12:40 PM, Sylvain Galineau wrote:
> > Precisely. And so is there a compelling reasons for the spec to define
> > which type of scrollbars cause which units to adjust?
> 
> I don't think the spec would have to do that.  If we wanted the auto-
> adjusting behavior (which is not obvious), we could just define vw/vh to
> be in terms of the ICB.  Except that happens to be what
> http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths says
> already, except it also talks about "viewport" which is not quite the same
> thing, the claims of http://www.w3.org/TR/CSS21/visudet.html#containing-
> block-details
> notwithstanding...

Right. I think we agree this shouldn't be defined in terms of 'if your 
scrollbar overlays then don't adjust these units, otherwise do'.

 
> I do think it's a bit weird that if I have a position:fixed element with
> no border/padding/margin, then setting "width: 20vh; right: 0" and
> "width: 20vh; left: 80vh" don't have the same behavior when there's a
> vertical scrollbar.  But this keeps coming back to what the use cases for
> vh/vw are.
> 
I find it weird too. 
Received on Tuesday, 4 December 2012 17:55:44 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:22 UTC