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