css_ast/values/scroll_anchoring/
mod.rs

1#![allow(warnings)]
2//! CSS Scroll Anchoring Module Level 1
3//! https://drafts.csswg.org/css-scroll-anchoring-1/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `overflow-anchor` as defined in [css-scroll-anchoring-1](https://drafts.csswg.org/css-scroll-anchoring-1/#overflow-anchor).
9///
10/// The overflow-anchor CSS property sets an element as a possible scroll anchor, reducing unintended scrolling when document changes occur above the current scrollport. This is enabled by default where supported.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// auto | none
16/// ```
17///
18// https://drafts.csswg.org/css-scroll-anchoring-1/#overflow-anchor
19#[syntax(" auto | none ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22	initial = "auto",
23	applies_to = "all elements",
24	inherited = "no",
25	percentages = "n/a",
26	canonical_order = "per grammar",
27	animation_type = "discrete"
28)]
29#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.overflow-anchor"))]
31#[visit]
32pub enum OverflowAnchorStyleValue {}