Skip to main content

css_ast/values/scroll_animations/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/40527902c4d0840cdb7a808c8cd42302be1c3bc8
3// Do not edit this file directly.
4#![allow(warnings)]
5//! https://drafts.csswg.org/scroll-animations-1/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `animation-range` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#animation-range).
11///
12/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// [ <'animation-range-start'> <'animation-range-end'>? ]#
18/// ```
19///
20/// https://drafts.csswg.org/scroll-animations-1/#animation-range
21#[syntax(" [ <'animation-range-start'> <'animation-range-end'>? ]# ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "see individual properties",
27    inherits = Unknown,
28    applies_to = Unknown,
29    animation_type = Unknown,
30    percentages = Unknown,
31    longhands = AnimationRangeStart|AnimationRangeEnd,
32    reset_by = Animation,
33    property_group = ScrollAnimations,
34    computed_value_type = Unknown,
35    canonical_order = "per grammar",
36)]
37#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
38#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-range"))]
39#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
40#[derive(csskit_derives::NodeWithMetadata)]
41pub struct AnimationRangeStyleValue<'a>;
42
43/// Represents the style value for `animation-range-end` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#animation-range-end).
44///
45/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
46///
47/// The grammar is defined as:
48///
49/// ```text,ignore
50/// [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#
51/// ```
52///
53/// https://drafts.csswg.org/scroll-animations-1/#animation-range-end
54#[syntax(" [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]# ")]
55#[derive(
56	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
57)]
58#[declaration_metadata(
59    initial = "normal",
60    applies_to = Elements,
61    percentages = Unknown,
62    shorthands = AnimationRange,
63    reset_by = Animation,
64    property_group = ScrollAnimations,
65    computed_value_type = Unknown,
66    canonical_order = "per grammar",
67)]
68#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
69#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-range-end"))]
70#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
71#[derive(csskit_derives::NodeWithMetadata)]
72pub struct AnimationRangeEndStyleValue<'a>;
73
74/// Represents the style value for `animation-range-start` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#animation-range-start).
75///
76/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
77///
78/// The grammar is defined as:
79///
80/// ```text,ignore
81/// [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#
82/// ```
83///
84/// https://drafts.csswg.org/scroll-animations-1/#animation-range-start
85#[syntax(" [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]# ")]
86#[derive(
87	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
88)]
89#[declaration_metadata(
90    initial = "normal",
91    applies_to = Elements,
92    percentages = Unknown,
93    shorthands = AnimationRange,
94    reset_by = Animation,
95    property_group = ScrollAnimations,
96    computed_value_type = Unknown,
97    canonical_order = "per grammar",
98)]
99#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
100#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-range-start"))]
101#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
102#[derive(csskit_derives::NodeWithMetadata)]
103pub struct AnimationRangeStartStyleValue<'a>;
104
105/// Represents the style value for `scroll-timeline` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#scroll-timeline).
106///
107/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
108///
109/// The grammar is defined as:
110///
111/// ```text,ignore
112/// [ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#
113/// ```
114///
115/// https://drafts.csswg.org/scroll-animations-1/#scroll-timeline
116#[syntax(" [ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]# ")]
117#[derive(
118	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
119)]
120#[declaration_metadata(
121    initial = "see individual properties",
122    applies_to = Elements,
123    percentages = Unknown,
124    longhands = ScrollTimelineName|ScrollTimelineAxis,
125    property_group = ScrollAnimations,
126    computed_value_type = Unknown,
127    canonical_order = "per grammar",
128)]
129#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
130#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-timeline"))]
131#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
132#[derive(csskit_derives::NodeWithMetadata)]
133pub struct ScrollTimelineStyleValue<'a>;
134
135/// Represents the style value for `scroll-timeline-axis` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-axis).
136///
137/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
138///
139/// The grammar is defined as:
140///
141/// ```text,ignore
142/// [ block | inline | x | y ]#
143/// ```
144///
145/// https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-axis
146#[syntax(" [ block | inline | x | y ]# ")]
147#[derive(
148	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
149)]
150#[declaration_metadata(
151    initial = "block",
152    applies_to = Elements,
153    shorthands = ScrollTimeline,
154    property_group = ScrollAnimations,
155    computed_value_type = Unknown,
156    canonical_order = "per grammar",
157)]
158#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
159#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-timeline-axis"))]
160#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
161#[derive(csskit_derives::NodeWithMetadata)]
162pub struct ScrollTimelineAxisStyleValue<'a>;
163
164/// Represents the style value for `scroll-timeline-name` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-name).
165///
166/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
167///
168/// The grammar is defined as:
169///
170/// ```text,ignore
171/// [ none | <dashed-ident> ]#
172/// ```
173///
174/// https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-name
175#[syntax(" [ none | <dashed-ident> ]# ")]
176#[derive(
177	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
178)]
179#[declaration_metadata(
180    initial = "none",
181    applies_to = Elements,
182    shorthands = ScrollTimeline,
183    property_group = ScrollAnimations,
184    computed_value_type = Unknown,
185    canonical_order = "per grammar",
186)]
187#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
188#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scroll-timeline-name"))]
189#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
190#[derive(csskit_derives::NodeWithMetadata)]
191pub struct ScrollTimelineNameStyleValue<'a>;
192
193/// Represents the style value for `timeline-scope` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#timeline-scope).
194///
195/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
196///
197/// The grammar is defined as:
198///
199/// ```text,ignore
200/// none | all | <dashed-ident>#
201/// ```
202///
203/// https://drafts.csswg.org/scroll-animations-1/#timeline-scope
204#[syntax(" none | all | <dashed-ident># ")]
205#[derive(
206	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
207)]
208#[declaration_metadata(
209    initial = "none",
210    applies_to = Elements,
211    property_group = ScrollAnimations,
212    computed_value_type = Unknown,
213    canonical_order = "per grammar",
214)]
215#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
216#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.timeline-scope"))]
217#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
218#[derive(csskit_derives::NodeWithMetadata)]
219pub enum TimelineScopeStyleValue<'a> {}
220
221/// Represents the style value for `view-timeline` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#view-timeline).
222///
223/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
224///
225/// The grammar is defined as:
226///
227/// ```text,ignore
228/// [ <'view-timeline-name'> [ <'view-timeline-axis'> || <'view-timeline-inset'> ]? ]#
229/// ```
230///
231/// https://drafts.csswg.org/scroll-animations-1/#view-timeline
232#[syntax(" [ <'view-timeline-name'> [ <'view-timeline-axis'> || <'view-timeline-inset'> ]? ]# ")]
233#[derive(
234	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
235)]
236#[declaration_metadata(
237    initial = "see individual properties",
238    inherits = Unknown,
239    applies_to = Elements,
240    animation_type = Unknown,
241    percentages = Unknown,
242    longhands = ViewTimelineName|ViewTimelineAxis|ViewTimelineInset,
243    property_group = ScrollAnimations,
244    computed_value_type = Unknown,
245    canonical_order = "per grammar",
246)]
247#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
248#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.view-timeline"))]
249#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
250#[derive(csskit_derives::NodeWithMetadata)]
251pub struct ViewTimelineStyleValue<'a>;
252
253/// Represents the style value for `view-timeline-axis` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#view-timeline-axis).
254///
255/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
256///
257/// The grammar is defined as:
258///
259/// ```text,ignore
260/// [ block | inline | x | y ]#
261/// ```
262///
263/// https://drafts.csswg.org/scroll-animations-1/#view-timeline-axis
264#[syntax(" [ block | inline | x | y ]# ")]
265#[derive(
266	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
267)]
268#[declaration_metadata(
269    initial = "block",
270    applies_to = Elements,
271    shorthands = ViewTimeline,
272    property_group = ScrollAnimations,
273    computed_value_type = Unknown,
274    canonical_order = "per grammar",
275)]
276#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
277#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.view-timeline-axis"))]
278#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
279#[derive(csskit_derives::NodeWithMetadata)]
280pub struct ViewTimelineAxisStyleValue<'a>;
281
282/// Represents the style value for `view-timeline-inset` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#view-timeline-inset).
283///
284/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
285///
286/// The grammar is defined as:
287///
288/// ```text,ignore
289/// [ [ auto | <length-percentage> ]{1,2} ]#
290/// ```
291///
292/// https://drafts.csswg.org/scroll-animations-1/#view-timeline-inset
293#[syntax(" [ [ auto | <length-percentage> ]{1,2} ]# ")]
294#[derive(
295	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
296)]
297#[declaration_metadata(
298    initial = "auto",
299    applies_to = Elements,
300    animation_type = ByComputedValue,
301    percentages = Scrollport,
302    shorthands = ViewTimeline,
303    property_group = ScrollAnimations,
304    computed_value_type = Unknown,
305    canonical_order = "per grammar",
306)]
307#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
308#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.view-timeline-inset"))]
309#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
310#[derive(csskit_derives::NodeWithMetadata)]
311pub struct ViewTimelineInsetStyleValue<'a>;
312
313/// Represents the style value for `view-timeline-name` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#view-timeline-name).
314///
315/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
316///
317/// The grammar is defined as:
318///
319/// ```text,ignore
320/// [ none | <dashed-ident> ]#
321/// ```
322///
323/// https://drafts.csswg.org/scroll-animations-1/#view-timeline-name
324#[syntax(" [ none | <dashed-ident> ]# ")]
325#[derive(
326	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
327)]
328#[declaration_metadata(
329    initial = "none",
330    applies_to = Elements,
331    shorthands = ViewTimeline,
332    property_group = ScrollAnimations,
333    computed_value_type = Unknown,
334    canonical_order = "per grammar",
335)]
336#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
337#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.view-timeline-name"))]
338#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
339#[derive(csskit_derives::NodeWithMetadata)]
340pub struct ViewTimelineNameStyleValue<'a>;