css_ast/values/scroll_animations/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/7e27ad7484307dfdbe9d0e18ad19d02859389688
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(
230//     " [ <'view-timeline-name'> [ <'view-timeline-axis'> || <'view-timeline-inset'> ]? ]# "
231// )]
232// #[derive(
233//     Parse,
234//     Peek,
235//     ToSpan,
236//     ToCursors,
237//     DeclarationMetadata,
238//     SemanticEq,
239//     Debug,
240//     Clone,
241//     PartialEq,
242//     Eq,
243//     PartialOrd,
244//     Ord,
245//     Hash,
246// )]
247// #[declaration_metadata(
248//     initial = "see individual properties",
249//     inherits = Unknown,
250//     applies_to = Elements,
251//     animation_type = Unknown,
252//     percentages = Unknown,
253//     longhands = ViewTimelineAxis|ViewTimelineInset|ViewTimelineName,
254//     property_group = ScrollAnimations,
255//     computed_value_type = Unknown,
256//     canonical_order = "per grammar",
257// )]
258// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
259// #[cfg_attr(
260//     feature = "css_feature_data",
261//     derive(ToCSSFeature),
262//     css_feature("css.properties.view-timeline")
263// )]
264// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
265// #[derive(csskit_derives::NodeWithMetadata)]
266// pub struct ViewTimelineStyleValue<'a>;
267
268/// Represents the style value for `view-timeline-axis` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#view-timeline-axis).
269///
270/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
271///
272/// The grammar is defined as:
273///
274/// ```text,ignore
275/// [ block | inline | x | y ]#
276/// ```
277///
278/// https://drafts.csswg.org/scroll-animations-1/#view-timeline-axis
279#[syntax(" [ block | inline | x | y ]# ")]
280#[derive(
281	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
282)]
283#[declaration_metadata(
284    initial = "block",
285    applies_to = Elements,
286    shorthand_group = ViewTimeline,
287    property_group = ScrollAnimations,
288    computed_value_type = Unknown,
289    canonical_order = "per grammar",
290)]
291#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
292#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.view-timeline-axis"))]
293#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
294#[derive(csskit_derives::NodeWithMetadata)]
295pub struct ViewTimelineAxisStyleValue<'a>;
296
297/// Represents the style value for `view-timeline-inset` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#view-timeline-inset).
298///
299/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
300///
301/// The grammar is defined as:
302///
303/// ```text,ignore
304/// [ [ auto | <length-percentage> ]{1,2} ]#
305/// ```
306///
307/// https://drafts.csswg.org/scroll-animations-1/#view-timeline-inset
308#[syntax(" [ [ auto | <length-percentage> ]{1,2} ]# ")]
309#[derive(
310	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
311)]
312#[declaration_metadata(
313    initial = "auto",
314    applies_to = Elements,
315    animation_type = ByComputedValue,
316    percentages = Scrollport,
317    shorthand_group = ViewTimeline,
318    property_group = ScrollAnimations,
319    computed_value_type = Unknown,
320    canonical_order = "per grammar",
321)]
322#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
323#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.view-timeline-inset"))]
324#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
325#[derive(csskit_derives::NodeWithMetadata)]
326pub struct ViewTimelineInsetStyleValue<'a>;
327
328/// Represents the style value for `view-timeline-name` as defined in [scroll-animations-1](https://drafts.csswg.org/scroll-animations-1/#view-timeline-name).
329///
330/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
331///
332/// The grammar is defined as:
333///
334/// ```text,ignore
335/// [ none | <dashed-ident> ]#
336/// ```
337///
338/// https://drafts.csswg.org/scroll-animations-1/#view-timeline-name
339#[syntax(" [ none | <dashed-ident> ]# ")]
340#[derive(
341	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
342)]
343#[declaration_metadata(
344    initial = "none",
345    applies_to = Elements,
346    shorthand_group = ViewTimeline,
347    property_group = ScrollAnimations,
348    computed_value_type = Unknown,
349    canonical_order = "per grammar",
350)]
351#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
352#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.view-timeline-name"))]
353#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
354#[derive(csskit_derives::NodeWithMetadata)]
355pub struct ViewTimelineNameStyleValue<'a>;