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