scrollbar-width
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The
scrollbar-width
property allows the author to set the desired thickness of an element's scrollbars when they are shown.
The purpose of the
scrollbar-width
is to optimize the space occupied by the scrollbar on a page or element; the purpose is not related to scrollbar aesthetics. The
scrollbar-width
predefined keyword values indicate to the user agent whether a normal or smaller scrollbar should be rendered. Avoid using
none
, as hiding a scrollbar negatively impacts
accessibility
.
Note:
For elements that are scrollable only via programmatic means and not by direct user interaction, use the
overflow
property with a value of
hidden
rather than
scrollbar-width: none
.