Provide a standardized way to hide scrollbars

HI all,

people often ask for a way to customize scrollbars in boxes with "overflow:
scroll" or "overflow: auto" or to hide them altogether while still
retaining native scrolling functionality (e.g. by touch, mouse wheel,
keyboard or by script) - so "overflow: hidden" is no option.

While there seems to be no standard way to customize scrollbars with CSS
(and defining such a standard way would need quite a lot of thought),  even
for hiding scrollbars there seems to be no consensus amongst browser
vendors.

In Webkit/Blink-based browsers there is the ::-webkit-scrollbar pseudo
element, which can be styled with "display: none", while Internet Explorer
10+ implements a "-ms-overflow-style: none" property. Firefox provides no
way to hide scrollbars (not counting ugly hacks).

The Webkit/Blink-way to hide scrollbars is probably much harder to
implement - as it would mean exposing a kind of internal DOM of the
scrollbars and as it would even allow to customize them.

On the other way, "overflow-style: none" should be easy to spec and
implement and even appeared in the latest CSS basis box model working
draft: http://www.w3.org/TR/css3-box/#the-lsquo3.

I filed a bug report for Firefox to implement this property:
https://bugzilla.mozilla.org/show_bug.cgi?id=1011851. There, the question
was raised what the support of the spec I cited amongst the CSS WG members
is.

(And in case there is no consensus outside of IE, is there a better idea to
allow scrollbars to be hidden in "overflow: scroll" boxes?)

Best,

Marc Nieper-Wißkirchen

Received on Sunday, 18 May 2014 21:58:01 UTC