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

[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