W3C home > Mailing lists > Public > www-style@w3.org > May 2014

Re: Provide a standardized way to hide scrollbars

From: Marc Nieper-Wißkirchen <marc.nieper@gmail.com>
Date: Wed, 21 May 2014 17:09:17 +0200
Message-ID: <CAEYrNrRmqhQmh00h5VBoRgbQnauQXOK0zQ4yLwiGMuzjh0zdsw@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: www-style@w3.org
> Compared to 'overflow: scroll', 'overflow: hidden' disables all mechanisms
> that allow the user to scroll (including hiding scrollbars). It does not
> disable scrolling entirely: Element.scrollTop and Element.scrollLeft can
> still be set from script.
> I suppose we could have a new keyword for the 'overflow' property that
> only hide scrollbars, but leaves other mechanisms. We already have a level
> 3 spec that extends this property:
> http://dev.w3.org/csswg/css-overflow/
> However, if the goal rather than just to hide the native scrollbars is to
> replace them with other scrollbars implemented in JavaScript, I’d recommend
> not to do that. Dispatching a DOM event and doing math in JavaScript before
> setting the new scroll position, for every frame, can probably not be as
> smooth as native scrolling which in some cases is done purely on the GPU.

No, the goal is just to hide the scrollbars visibly (maybe because the
content itself conveys the current scrolling position to the user) but not
to disable native scrolling. Thus 'overflow: hidden' and setting
'scrollTop', 'scrollLeft' by script is no option.

Adding another keyword to the overflow property raises the question whether
the option of scrolling behaviour while not showing the scrollbars is
really exclusive to the other proposed properties for overflow. Reviving
the overflow-style property would not raise this problem and would be
compatible with IE's solution:

Marc Nieper-Wißkirchen
Received on Wednesday, 21 May 2014 15:10:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:42 UTC