css_ast/values/overscroll/
mod.rs

1#![allow(warnings)]
2//! CSS Overscroll Behavior Module Level 1
3//! https://drafts.csswg.org/css-overscroll-1/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `overscroll-behavior` as defined in [css-overscroll-1](https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior).
9///
10/// The overscroll-behavior CSS property disables default scrolling behaviors when the edges of a scrolling area are reached.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// [ contain | none | auto ]{1,2}
16/// ```
17///
18// https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior
19#[syntax(" [ contain | none | auto ]{1,2} ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22	initial = "auto auto",
23	applies_to = "scroll container 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.overscroll-behavior"))]
31#[visit]
32pub struct OverscrollBehaviorStyleValue;
33
34/// Represents the style value for `overscroll-behavior-x` as defined in [css-overscroll-1](https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior-x).
35///
36/// The overscroll-behavior CSS property disables default scrolling behaviors when the edges of a scrolling area are reached.
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// contain | none | auto
42/// ```
43///
44// https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior-x
45#[syntax(" contain | none | auto ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48	initial = "auto",
49	applies_to = "scroll container elements",
50	inherited = "no",
51	percentages = "n/a",
52	canonical_order = "per grammar",
53	animation_type = "discrete"
54)]
55#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
56#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.overscroll-behavior-x"))]
57#[visit]
58pub enum OverscrollBehaviorXStyleValue {}
59
60/// Represents the style value for `overscroll-behavior-y` as defined in [css-overscroll-1](https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior-y).
61///
62/// The overscroll-behavior CSS property disables default scrolling behaviors when the edges of a scrolling area are reached.
63///
64/// The grammar is defined as:
65///
66/// ```text,ignore
67/// contain | none | auto
68/// ```
69///
70// https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior-y
71#[syntax(" contain | none | auto ")]
72#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
73#[style_value(
74	initial = "auto",
75	applies_to = "scroll container elements",
76	inherited = "no",
77	percentages = "n/a",
78	canonical_order = "per grammar",
79	animation_type = "discrete"
80)]
81#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
82#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.overscroll-behavior-y"))]
83#[visit]
84pub enum OverscrollBehaviorYStyleValue {}
85
86/// Represents the style value for `overscroll-behavior-inline` as defined in [css-overscroll-1](https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior-inline).
87///
88/// The overscroll-behavior CSS property disables default scrolling behaviors when the edges of a scrolling area are reached.
89///
90/// The grammar is defined as:
91///
92/// ```text,ignore
93/// contain | none | auto
94/// ```
95///
96// https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior-inline
97#[syntax(" contain | none | auto ")]
98#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
99#[style_value(
100	initial = "auto",
101	applies_to = "scroll container elements",
102	inherited = "no",
103	percentages = "n/a",
104	canonical_order = "per grammar",
105	animation_type = "discrete"
106)]
107#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
108#[cfg_attr(
109	feature = "css_feature_data",
110	derive(ToCSSFeature),
111	css_feature("css.properties.overscroll-behavior-inline")
112)]
113#[visit]
114pub enum OverscrollBehaviorInlineStyleValue {}
115
116/// Represents the style value for `overscroll-behavior-block` as defined in [css-overscroll-1](https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior-block).
117///
118/// The overscroll-behavior CSS property disables default scrolling behaviors when the edges of a scrolling area are reached.
119///
120/// The grammar is defined as:
121///
122/// ```text,ignore
123/// contain | none | auto
124/// ```
125///
126// https://drafts.csswg.org/css-overscroll-1/#overscroll-behavior-block
127#[syntax(" contain | none | auto ")]
128#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
129#[style_value(
130	initial = "auto",
131	applies_to = "scroll container elements",
132	inherited = "no",
133	percentages = "n/a",
134	canonical_order = "per grammar",
135	animation_type = "discrete"
136)]
137#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
138#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.overscroll-behavior-block"))]
139#[visit]
140pub enum OverscrollBehaviorBlockStyleValue {}