Skip to main content

css_ast/values/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/css-animations-2/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `animation` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation).
11///
12/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// <single-animation>#
18/// ```
19///
20/// https://drafts.csswg.org/css-animations-2/#animation
21#[syntax(" <single-animation># ")]
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    applies_to = Elements,
28    longhands = AnimationName|AnimationDuration|AnimationTimingFunction|AnimationDelay|AnimationDelayStart|AnimationDelayEnd|AnimationIterationCount|AnimationDirection|AnimationFillMode|AnimationPlayState,
29    resets = AnimationRange|AnimationTimeline,
30    property_group = Animations,
31    computed_value_type = Unknown,
32    canonical_order = "per grammar",
33)]
34#[declaration_writes(
35    AnimationName?,
36    AnimationDuration?,
37    AnimationTimingFunction?,
38    AnimationDelay?,
39    AnimationIterationCount?,
40    AnimationDirection?,
41    AnimationFillMode?,
42    AnimationPlayState?
43)]
44#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
45#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation"))]
46#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
47#[derive(csskit_derives::NodeWithMetadata)]
48pub struct AnimationStyleValue<'a>;
49
50/// Represents the style value for `animation-composition` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-composition).
51///
52/// The animation-composition CSS property chooses how to combine animations that affect the same property.
53///
54/// The grammar is defined as:
55///
56/// ```text,ignore
57/// <single-animation-composition>#
58/// ```
59///
60/// https://drafts.csswg.org/css-animations-2/#animation-composition
61#[syntax(" <single-animation-composition># ")]
62#[derive(
63	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
64)]
65#[declaration_metadata(
66    initial = "replace",
67    applies_to = Elements,
68    property_group = Animations,
69    computed_value_type = Unknown,
70    canonical_order = "per grammar",
71)]
72#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
73#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-composition"))]
74#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
75#[derive(csskit_derives::NodeWithMetadata)]
76pub struct AnimationCompositionStyleValue<'a>;
77
78/// Represents the style value for `animation-delay` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-delay).
79///
80/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
81///
82/// The grammar is defined as:
83///
84/// ```text,ignore
85/// [ <'animation-delay-start'> <'animation-delay-end'>? ]#
86/// ```
87///
88/// https://drafts.csswg.org/css-animations-2/#animation-delay
89#[syntax(" [ <'animation-delay-start'> <'animation-delay-end'>? ]# ")]
90#[derive(
91	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
92)]
93#[declaration_metadata(
94    initial = "see individual properties",
95    inherits = Unknown,
96    applies_to = Unknown,
97    animation_type = Unknown,
98    percentages = Unknown,
99    longhands = AnimationDelayStart|AnimationDelayEnd,
100    shorthands = Animation,
101    property_group = Animations,
102    computed_value_type = Unknown,
103    canonical_order = "per grammar",
104)]
105#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
106#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-delay"))]
107#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
108#[derive(csskit_derives::NodeWithMetadata)]
109pub struct AnimationDelayStyleValue<'a>;
110
111/// Represents the style value for `animation-delay-end` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-delay-end).
112///
113/// The grammar is defined as:
114///
115/// ```text,ignore
116/// <time [0s,∞]>#
117/// ```
118///
119/// https://drafts.csswg.org/css-animations-2/#animation-delay-end
120#[syntax(" <time [0s,∞]># ")]
121#[derive(
122	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
123)]
124#[declaration_metadata(
125    initial = "0s",
126    applies_to = Elements,
127    shorthands = AnimationDelay|Animation,
128    property_group = Animations,
129    computed_value_type = Unknown,
130    canonical_order = "per grammar",
131)]
132#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
133#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-delay-end"))]
134#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
135#[derive(csskit_derives::NodeWithMetadata)]
136pub struct AnimationDelayEndStyleValue<'a>;
137
138/// Represents the style value for `animation-delay-start` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-delay-start).
139///
140/// The grammar is defined as:
141///
142/// ```text,ignore
143/// <time>#
144/// ```
145///
146/// https://drafts.csswg.org/css-animations-2/#animation-delay-start
147#[syntax(" <time># ")]
148#[derive(
149	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
150)]
151#[declaration_metadata(
152    initial = "0s",
153    applies_to = Elements,
154    shorthands = AnimationDelay|Animation,
155    property_group = Animations,
156    computed_value_type = Unknown,
157    canonical_order = "per grammar",
158)]
159#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
160#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-delay-start"))]
161#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
162#[derive(csskit_derives::NodeWithMetadata)]
163pub struct AnimationDelayStartStyleValue<'a>;
164
165/// Represents the style value for `animation-direction` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-direction).
166///
167/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
168///
169/// The grammar is defined as:
170///
171/// ```text,ignore
172/// <single-animation-direction>#
173/// ```
174///
175/// https://drafts.csswg.org/css-animations-2/#animation-direction
176#[syntax(" <single-animation-direction># ")]
177#[derive(
178	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
179)]
180#[declaration_metadata(
181    initial = "normal",
182    applies_to = Elements,
183    shorthands = Animation,
184    property_group = Animations,
185    computed_value_type = Unknown,
186    canonical_order = "per grammar",
187)]
188#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
189#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-direction"))]
190#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
191#[derive(csskit_derives::NodeWithMetadata)]
192pub struct AnimationDirectionStyleValue<'a>;
193
194/// Represents the style value for `animation-duration` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-duration).
195///
196/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
197///
198/// The grammar is defined as:
199///
200/// ```text,ignore
201/// [ auto | <time [0s,∞]> ]#
202/// ```
203///
204/// https://drafts.csswg.org/css-animations-2/#animation-duration
205#[syntax(" [ auto | <time [0s,∞]> ]# ")]
206#[derive(
207	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
208)]
209#[declaration_metadata(
210    initial = "auto",
211    applies_to = Elements,
212    shorthands = Animation,
213    property_group = Animations,
214    computed_value_type = Unknown,
215    canonical_order = "per grammar",
216)]
217#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
218#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-duration"))]
219#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
220#[derive(csskit_derives::NodeWithMetadata)]
221pub struct AnimationDurationStyleValue<'a>;
222
223/// Represents the style value for `animation-fill-mode` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-fill-mode).
224///
225/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
226///
227/// The grammar is defined as:
228///
229/// ```text,ignore
230/// <single-animation-fill-mode>#
231/// ```
232///
233/// https://drafts.csswg.org/css-animations-2/#animation-fill-mode
234#[syntax(" <single-animation-fill-mode># ")]
235#[derive(
236	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
237)]
238#[declaration_metadata(
239    initial = "none",
240    applies_to = Elements,
241    shorthands = Animation,
242    property_group = Animations,
243    computed_value_type = Unknown,
244    canonical_order = "per grammar",
245)]
246#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
247#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-fill-mode"))]
248#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
249#[derive(csskit_derives::NodeWithMetadata)]
250pub struct AnimationFillModeStyleValue<'a>;
251
252/// Represents the style value for `animation-iteration-count` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-iteration-count).
253///
254/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
255///
256/// The grammar is defined as:
257///
258/// ```text,ignore
259/// <single-animation-iteration-count>#
260/// ```
261///
262/// https://drafts.csswg.org/css-animations-2/#animation-iteration-count
263#[syntax(" <single-animation-iteration-count># ")]
264#[derive(
265	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
266)]
267#[declaration_metadata(
268    initial = "1",
269    applies_to = Elements,
270    shorthands = Animation,
271    property_group = Animations,
272    computed_value_type = Unknown,
273    canonical_order = "per grammar",
274)]
275#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
276#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-iteration-count"))]
277#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
278#[derive(csskit_derives::NodeWithMetadata)]
279pub struct AnimationIterationCountStyleValue<'a>;
280
281/// Represents the style value for `animation-name` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-name).
282///
283/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
284///
285/// The grammar is defined as:
286///
287/// ```text,ignore
288/// [ none | <keyframes-name> ]#
289/// ```
290///
291/// https://drafts.csswg.org/css-animations-2/#animation-name
292#[syntax(" [ none | <keyframes-name> ]# ")]
293#[derive(
294	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
295)]
296#[declaration_metadata(
297    initial = "none",
298    applies_to = Elements,
299    shorthands = Animation,
300    property_group = Animations,
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.animation-name"))]
306#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
307#[derive(csskit_derives::NodeWithMetadata)]
308pub struct AnimationNameStyleValue<'a>;
309
310/// Represents the style value for `animation-play-state` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-play-state).
311///
312/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
313///
314/// The grammar is defined as:
315///
316/// ```text,ignore
317/// <single-animation-play-state>#
318/// ```
319///
320/// https://drafts.csswg.org/css-animations-2/#animation-play-state
321#[syntax(" <single-animation-play-state># ")]
322#[derive(
323	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
324)]
325#[declaration_metadata(
326    initial = "running",
327    applies_to = Elements,
328    shorthands = Animation,
329    property_group = Animations,
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.animation-play-state"))]
335#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
336#[derive(csskit_derives::NodeWithMetadata)]
337pub struct AnimationPlayStateStyleValue<'a>;
338
339/// Represents the style value for `animation-timeline` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-timeline).
340///
341/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
342///
343/// The grammar is defined as:
344///
345/// ```text,ignore
346/// <single-animation-timeline>#
347/// ```
348///
349/// https://drafts.csswg.org/css-animations-2/#animation-timeline
350#[syntax(" <single-animation-timeline># ")]
351#[derive(
352	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
353)]
354#[declaration_metadata(
355    initial = "auto",
356    applies_to = Elements,
357    reset_by = Animation,
358    property_group = Animations,
359    computed_value_type = Unknown,
360    canonical_order = "per grammar",
361)]
362#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
363#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-timeline"))]
364#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
365#[derive(csskit_derives::NodeWithMetadata)]
366pub struct AnimationTimelineStyleValue<'a>;
367
368/// Represents the style value for `animation-timing-function` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-timing-function).
369///
370/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
371///
372/// The grammar is defined as:
373///
374/// ```text,ignore
375/// <easing-function>#
376/// ```
377///
378/// https://drafts.csswg.org/css-animations-2/#animation-timing-function
379#[syntax(" <easing-function># ")]
380#[derive(
381	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
382)]
383#[declaration_metadata(
384    initial = "ease",
385    applies_to = Elements,
386    shorthands = Animation,
387    property_group = Animations,
388    computed_value_type = Unknown,
389    canonical_order = "per grammar",
390)]
391#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
392#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-timing-function"))]
393#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
394#[derive(csskit_derives::NodeWithMetadata)]
395pub struct AnimationTimingFunctionStyleValue<'a>;