monks/scrollbar_gutter

The scrollbar-gutter CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn’t needed.

An element’s scrollbar gutter is the space between the inner border edge and the outer padding edge, where the browser may display a scrollbar. If no scrollbar is present, the gutter will be painted as an extension of the padding.

The browser determines whether classic scrollbars or overlay scrollbars are used:

Values

pub const auto_: #(String, String)
  • : The initial value. Classic scrollbars create a gutter when overflow is scroll, or when overflow is auto and the box is overflowing. Overlay scrollbars do not consume space.
pub const both_edges: #(String, String)
  • : If a gutter would be present on one of the inline start/end edges of the box, another will be present on the opposite edge as well.
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for scrollbar-gutter

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const stable: #(String, String)
  • : When using classic scrollbars, the gutter will be present if overflow is auto, scroll, or hidden even if the box is not overflowing. When using overlay scrollbars, the gutter will not be present.
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for scrollbar-gutter. It will be wrapped in var() and have -- prepended.

Search Document