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