monks/scrollbar_width
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.
For elements that are scrollable only via programmatic means and not by direct user interaction, use the {{cssxref(“overflow”)}} property with a value of
hiddenrather thanscrollbar-width: none.
Values
pub const none: #(String, String)
- : No scrollbar shown, however the element will still be scrollable.> [!NOTE]> User Agents must apply any
scrollbar-widthvalue set on the root element to the viewport.
pub const revert_layer: #(String, String)
pub const thin: #(String, String)
- : A thin scrollbar width variant on platforms that provide that option, or a thinner scrollbar than the default platform scrollbar width.