W3C home > Mailing lists > Public > www-style@w3.org > January 2013

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

From: Markus Ernst <derernst@gmx.ch>
Date: Thu, 24 Jan 2013 09:15:42 +0100
Message-ID: <5100EDAE.3020200@gmx.ch>
To: Rossen Atanassov <Rossen.Atanassov@microsoft.com>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>
Am 24.01.2013 07:23 schrieb Rossen Atanassov:
>> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
>> Sent: Tuesday, January 22, 2013 6:34 PM
>
>> In that case, I acknowledge that there's a reasonable user-safety argument
>> for making "auto" act like "hidden" in both dimensions.
>
> I too agree that ignoring the size of scrollbars when overflow is "auto" makes more
> sense than accounting for them. As you mentioned, if authors really expect to have
> scrollbars on the viewport and they're using viewport units they can simply specify
> overflow:sroll and be done with it.

May I humbly suggest the opposite from my author's POV. It seems to me 
that it would be desirable to have the scrollbar size subtracted when 
overflow is set to "auto".

One main reason to use vw rather than % is to prevent centered designs 
from "jumping" horizontally when navigating between pages with or 
without scrollbars.

No authors want their content to be covered by scrollbars, and if 
authors wanted to force scrollbars, they could also do this using %. So, 
if vw ignores the scrollbar width when overflow is "auto", authors will 
end up setting right margins or paddings to prevent the content to be 
covered by scrollbars, which results in wasting space on devices with 
other scrolling mechanisms.

OTOH, if the scrollbar width is subtracted by default, vw is a 
rock-solid and easy-to-use alternative to %.

(An alternative, even better solution would be to invent a unit for the 
scrollbar-adjusted width of any element, not only the viewport.)
Received on Thursday, 24 January 2013 08:16:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:04 GMT