monks/overflow_anchor

The overflow-anchor CSS property provides a way to opt out of the browser’s scroll anchoring behavior, which adjusts scroll position to minimize content shifts.

Scroll anchoring behavior is enabled by default in any browser that supports it. Therefore, changing the value of this property is typically only required if you are experiencing problems with scroll anchoring in a document or part of a document and need to turn the behavior off.

Values

pub const auto_: #(String, String)
  • : The element becomes a potential anchor when adjusting scroll position.
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const none: #(String, String)
  • : The element won’t be selected as a potential anchor.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for overflow-anchor

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

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

Search Document