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/ddbceaa3cee88f134d557c3051c26fcb5554a535
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/// <time>#
75/// ```
76///
77/// https://drafts.csswg.org/css-animations-2/#animation-delay
78#[syntax(" <time># ")]
79#[derive(
80	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
81)]
82#[declaration_metadata(
83    initial = "0s",
84    applies_to = Elements,
85    shorthand_group = Animation,
86    property_group = Animations,
87    computed_value_type = Unknown,
88    canonical_order = "per grammar",
89)]
90#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
91#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-delay"))]
92#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
93#[derive(csskit_derives::NodeWithMetadata)]
94pub struct AnimationDelayStyleValue<'a>;
95
96/// Represents the style value for `animation-direction` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-direction).
97///
98/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
99///
100/// The grammar is defined as:
101///
102/// ```text,ignore
103/// <single-animation-direction>#
104/// ```
105///
106/// https://drafts.csswg.org/css-animations-2/#animation-direction
107#[syntax(" <single-animation-direction># ")]
108#[derive(
109	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
110)]
111#[declaration_metadata(
112    initial = "normal",
113    applies_to = Elements,
114    shorthand_group = Animation,
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-direction"))]
121#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
122#[derive(csskit_derives::NodeWithMetadata)]
123pub struct AnimationDirectionStyleValue<'a>;
124
125/// Represents the style value for `animation-duration` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-duration).
126///
127/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
128///
129/// The grammar is defined as:
130///
131/// ```text,ignore
132/// [ auto | <time [0s,∞]> ]#
133/// ```
134///
135/// https://drafts.csswg.org/css-animations-2/#animation-duration
136#[syntax(" [ auto | <time [0s,∞]> ]# ")]
137#[derive(
138	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
139)]
140#[declaration_metadata(
141    initial = "auto",
142    applies_to = Elements,
143    shorthand_group = Animation,
144    property_group = Animations,
145    computed_value_type = Unknown,
146    canonical_order = "per grammar",
147)]
148#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
149#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-duration"))]
150#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
151#[derive(csskit_derives::NodeWithMetadata)]
152pub struct AnimationDurationStyleValue<'a>;
153
154/// Represents the style value for `animation-fill-mode` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-fill-mode).
155///
156/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
157///
158/// The grammar is defined as:
159///
160/// ```text,ignore
161/// <single-animation-fill-mode>#
162/// ```
163///
164/// https://drafts.csswg.org/css-animations-2/#animation-fill-mode
165#[syntax(" <single-animation-fill-mode># ")]
166#[derive(
167	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
168)]
169#[declaration_metadata(
170    initial = "none",
171    applies_to = Elements,
172    shorthand_group = Animation,
173    property_group = Animations,
174    computed_value_type = Unknown,
175    canonical_order = "per grammar",
176)]
177#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
178#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-fill-mode"))]
179#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
180#[derive(csskit_derives::NodeWithMetadata)]
181pub struct AnimationFillModeStyleValue<'a>;
182
183/// Represents the style value for `animation-iteration-count` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-iteration-count).
184///
185/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
186///
187/// The grammar is defined as:
188///
189/// ```text,ignore
190/// <single-animation-iteration-count>#
191/// ```
192///
193/// https://drafts.csswg.org/css-animations-2/#animation-iteration-count
194#[syntax(" <single-animation-iteration-count># ")]
195#[derive(
196	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
197)]
198#[declaration_metadata(
199    initial = "1",
200    applies_to = Elements,
201    shorthand_group = Animation,
202    property_group = Animations,
203    computed_value_type = Unknown,
204    canonical_order = "per grammar",
205)]
206#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
207#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-iteration-count"))]
208#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
209#[derive(csskit_derives::NodeWithMetadata)]
210pub struct AnimationIterationCountStyleValue<'a>;
211
212/// Represents the style value for `animation-name` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-name).
213///
214/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
215///
216/// The grammar is defined as:
217///
218/// ```text,ignore
219/// [ none | <keyframes-name> ]#
220/// ```
221///
222/// https://drafts.csswg.org/css-animations-2/#animation-name
223#[syntax(" [ none | <keyframes-name> ]# ")]
224#[derive(
225	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
226)]
227#[declaration_metadata(
228    initial = "none",
229    applies_to = Elements,
230    shorthand_group = Animation,
231    property_group = Animations,
232    computed_value_type = Unknown,
233    canonical_order = "per grammar",
234)]
235#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
236#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-name"))]
237#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
238#[derive(csskit_derives::NodeWithMetadata)]
239pub struct AnimationNameStyleValue<'a>;
240
241/// Represents the style value for `animation-play-state` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-play-state).
242///
243/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
244///
245/// The grammar is defined as:
246///
247/// ```text,ignore
248/// <single-animation-play-state>#
249/// ```
250///
251/// https://drafts.csswg.org/css-animations-2/#animation-play-state
252#[syntax(" <single-animation-play-state># ")]
253#[derive(
254	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
255)]
256#[declaration_metadata(
257    initial = "running",
258    applies_to = Elements,
259    shorthand_group = Animation,
260    property_group = Animations,
261    computed_value_type = Unknown,
262    canonical_order = "per grammar",
263)]
264#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
265#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-play-state"))]
266#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
267#[derive(csskit_derives::NodeWithMetadata)]
268pub struct AnimationPlayStateStyleValue<'a>;
269
270/// Represents the style value for `animation-timeline` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-timeline).
271///
272/// The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.
273///
274/// The grammar is defined as:
275///
276/// ```text,ignore
277/// <single-animation-timeline>#
278/// ```
279///
280/// https://drafts.csswg.org/css-animations-2/#animation-timeline
281#[syntax(" <single-animation-timeline># ")]
282#[derive(
283	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
284)]
285#[declaration_metadata(
286    initial = "auto",
287    applies_to = Elements,
288    shorthand_group = Animation,
289    property_group = Animations,
290    computed_value_type = Unknown,
291    canonical_order = "per grammar",
292)]
293#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
294#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-timeline"))]
295#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
296#[derive(csskit_derives::NodeWithMetadata)]
297pub struct AnimationTimelineStyleValue<'a>;
298
299/// Represents the style value for `animation-timing-function` as defined in [css-animations-2](https://drafts.csswg.org/css-animations-2/#animation-timing-function).
300///
301/// The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
302///
303/// The grammar is defined as:
304///
305/// ```text,ignore
306/// <easing-function>#
307/// ```
308///
309/// https://drafts.csswg.org/css-animations-2/#animation-timing-function
310#[syntax(" <easing-function># ")]
311#[derive(
312	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
313)]
314#[declaration_metadata(
315    initial = "ease",
316    applies_to = Elements,
317    shorthand_group = Animation,
318    property_group = Animations,
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.animation-timing-function"))]
324#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
325#[derive(csskit_derives::NodeWithMetadata)]
326pub struct AnimationTimingFunctionStyleValue<'a>;