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

[Boris Zbarsky:]
> 
> 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...
> 
> 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.
> 
Also, from css3-mediaqueries [1]:

# The 'width' media feature describes the width of the 
# targeted display area of the output device. 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).

I think it would also be weird for vh/vw units to react to the presence of a 
scrollbar while MQ still considers the viewport width to be the same.


[1] http://www.w3.org/TR/css3-mediaqueries/#width

Received on Tuesday, 4 December 2012 18:00:56 UTC