Skip to main content

css_ast/values/animation_triggers/
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/animation-triggers-1/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `animation-trigger` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#animation-trigger).
11///
12/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// [ none | [ <dashed-ident> <animation-action>+ ]+ ]#
18/// ```
19///
20/// https://drafts.csswg.org/animation-triggers-1/#animation-trigger
21#[syntax(" [ none | [ <dashed-ident> <animation-action>+ ]+ ]# ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "none",
27    applies_to = Elements,
28    property_group = AnimationTriggers,
29    computed_value_type = AsSpecified,
30    canonical_order = "per grammar",
31)]
32#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
33#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.animation-trigger"))]
34#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
35#[derive(csskit_derives::NodeWithMetadata)]
36pub struct AnimationTriggerStyleValue<'a>;
37
38/// Represents the style value for `event-trigger` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#event-trigger).
39///
40/// The grammar is defined as:
41///
42/// ```text,ignore
43/// none | [ <'event-trigger-name'> <'event-trigger-source'> ]#
44/// ```
45///
46/// https://drafts.csswg.org/animation-triggers-1/#event-trigger
47#[syntax(" none | [ <'event-trigger-name'> <'event-trigger-source'> ]# ")]
48#[derive(
49	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
50)]
51#[declaration_metadata(
52    initial = "none",
53    applies_to = Elements,
54    property_group = AnimationTriggers,
55    computed_value_type = AsSpecified,
56    canonical_order = "per grammar",
57)]
58#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
59#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.event-trigger"))]
60#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
61#[derive(csskit_derives::NodeWithMetadata)]
62pub struct EventTriggerStyleValue<'a>;
63
64/// Represents the style value for `event-trigger-name` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#event-trigger-name).
65///
66/// The grammar is defined as:
67///
68/// ```text,ignore
69/// none | <dashed-ident>#
70/// ```
71///
72/// https://drafts.csswg.org/animation-triggers-1/#event-trigger-name
73#[syntax(" none | <dashed-ident># ")]
74#[derive(
75	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
76)]
77#[declaration_metadata(
78    initial = "none",
79    applies_to = Elements,
80    property_group = AnimationTriggers,
81    computed_value_type = AsSpecified,
82    canonical_order = "per grammar",
83)]
84#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
85#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.event-trigger-name"))]
86#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
87#[derive(csskit_derives::NodeWithMetadata)]
88pub struct EventTriggerNameStyleValue<'a>;
89
90/// Represents the style value for `event-trigger-source` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#event-trigger-source).
91///
92/// The grammar is defined as:
93///
94/// ```text,ignore
95/// [ none | <event-function>+ [ / <event-function>+ ]? ]#
96/// ```
97///
98/// https://drafts.csswg.org/animation-triggers-1/#event-trigger-source
99#[syntax(" [ none | <event-function>+ [ / <event-function>+ ]? ]# ")]
100#[derive(
101	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
102)]
103#[declaration_metadata(
104    initial = "none",
105    applies_to = Elements,
106    property_group = AnimationTriggers,
107    computed_value_type = AsSpecified,
108    canonical_order = "per grammar",
109)]
110#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
111#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.event-trigger-source"))]
112#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
113#[derive(csskit_derives::NodeWithMetadata)]
114pub struct EventTriggerSourceStyleValue<'a>;
115
116/// Represents the style value for `timeline-trigger` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger).
117///
118/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
119///
120/// The grammar is defined as:
121///
122/// ```text,ignore
123/// none | [ <'timeline-trigger-name'> <'timeline-trigger-source'> [ <'timeline-trigger-range'> ]? ]#
124/// ```
125///
126/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger
127#[syntax(" none | [ <'timeline-trigger-name'> <'timeline-trigger-source'> [ <'timeline-trigger-range'> ]? ]# ")]
128#[derive(
129	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
130)]
131#[declaration_metadata(
132    initial = "see individual properties",
133    inherits = Unknown,
134    applies_to = Unknown,
135    animation_type = Unknown,
136    percentages = Unknown,
137    property_group = AnimationTriggers,
138    computed_value_type = Unknown,
139    canonical_order = "per grammar",
140)]
141#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
142#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.timeline-trigger"))]
143#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
144#[derive(csskit_derives::NodeWithMetadata)]
145pub struct TimelineTriggerStyleValue<'a>;
146
147/// Represents the style value for `timeline-trigger-activation-range` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-activation-range).
148///
149/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
150///
151/// The grammar is defined as:
152///
153/// ```text,ignore
154/// [ <'timeline-trigger-activation-range-start'> <'timeline-trigger-activation-range-end'>? ]#
155/// ```
156///
157/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-activation-range
158#[syntax(" [ <'timeline-trigger-activation-range-start'> <'timeline-trigger-activation-range-end'>? ]# ")]
159#[derive(
160	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
161)]
162#[declaration_metadata(
163    initial = "see individual properties",
164    inherits = Unknown,
165    applies_to = Unknown,
166    animation_type = Unknown,
167    percentages = Unknown,
168    property_group = AnimationTriggers,
169    computed_value_type = Unknown,
170    canonical_order = "per grammar",
171)]
172#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
173#[cfg_attr(
174	feature = "css_feature_data",
175	derive(ToCSSFeature),
176	css_feature("css.properties.timeline-trigger-activation-range")
177)]
178#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
179#[derive(csskit_derives::NodeWithMetadata)]
180pub struct TimelineTriggerActivationRangeStyleValue<'a>;
181
182/// Represents the style value for `timeline-trigger-activation-range-end` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-activation-range-end).
183///
184/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
185///
186/// The grammar is defined as:
187///
188/// ```text,ignore
189/// [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#
190/// ```
191///
192/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-activation-range-end
193#[syntax(" [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]# ")]
194#[derive(
195	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
196)]
197#[declaration_metadata(
198    initial = "normal",
199    applies_to = Elements,
200    percentages = Unknown,
201    property_group = AnimationTriggers,
202    computed_value_type = Unknown,
203    canonical_order = "per grammar",
204)]
205#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
206#[cfg_attr(
207	feature = "css_feature_data",
208	derive(ToCSSFeature),
209	css_feature("css.properties.timeline-trigger-activation-range-end")
210)]
211#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
212#[derive(csskit_derives::NodeWithMetadata)]
213pub struct TimelineTriggerActivationRangeEndStyleValue<'a>;
214
215/// Represents the style value for `timeline-trigger-activation-range-start` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-activation-range-start).
216///
217/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
218///
219/// The grammar is defined as:
220///
221/// ```text,ignore
222/// [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#
223/// ```
224///
225/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-activation-range-start
226#[syntax(" [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]# ")]
227#[derive(
228	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
229)]
230#[declaration_metadata(
231    initial = "normal",
232    applies_to = Elements,
233    percentages = Unknown,
234    property_group = AnimationTriggers,
235    computed_value_type = Unknown,
236    canonical_order = "per grammar",
237)]
238#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
239#[cfg_attr(
240	feature = "css_feature_data",
241	derive(ToCSSFeature),
242	css_feature("css.properties.timeline-trigger-activation-range-start")
243)]
244#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
245#[derive(csskit_derives::NodeWithMetadata)]
246pub struct TimelineTriggerActivationRangeStartStyleValue<'a>;
247
248/// Represents the style value for `timeline-trigger-active-range` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-active-range).
249///
250/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
251///
252/// The grammar is defined as:
253///
254/// ```text,ignore
255/// [ <'timeline-trigger-active-range-start'> <'timeline-trigger-active-range-end'>? ]#
256/// ```
257///
258/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-active-range
259#[syntax(" [ <'timeline-trigger-active-range-start'> <'timeline-trigger-active-range-end'>? ]# ")]
260#[derive(
261	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
262)]
263#[declaration_metadata(
264    initial = "see individual properties",
265    inherits = Unknown,
266    applies_to = Unknown,
267    animation_type = Unknown,
268    percentages = Unknown,
269    property_group = AnimationTriggers,
270    computed_value_type = Unknown,
271    canonical_order = "per grammar",
272)]
273#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
274#[cfg_attr(
275	feature = "css_feature_data",
276	derive(ToCSSFeature),
277	css_feature("css.properties.timeline-trigger-active-range")
278)]
279#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
280#[derive(csskit_derives::NodeWithMetadata)]
281pub struct TimelineTriggerActiveRangeStyleValue<'a>;
282
283/// Represents the style value for `timeline-trigger-active-range-end` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-active-range-end).
284///
285/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
286///
287/// The grammar is defined as:
288///
289/// ```text,ignore
290/// [ auto | normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#
291/// ```
292///
293/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-active-range-end
294#[syntax(" [ auto | normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]# ")]
295#[derive(
296	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
297)]
298#[declaration_metadata(
299    initial = "auto",
300    applies_to = Elements,
301    percentages = Unknown,
302    property_group = AnimationTriggers,
303    computed_value_type = Unknown,
304    canonical_order = "per grammar",
305)]
306#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
307#[cfg_attr(
308	feature = "css_feature_data",
309	derive(ToCSSFeature),
310	css_feature("css.properties.timeline-trigger-active-range-end")
311)]
312#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
313#[derive(csskit_derives::NodeWithMetadata)]
314pub struct TimelineTriggerActiveRangeEndStyleValue<'a>;
315
316/// Represents the style value for `timeline-trigger-active-range-start` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-active-range-start).
317///
318/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
319///
320/// The grammar is defined as:
321///
322/// ```text,ignore
323/// [ auto | normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#
324/// ```
325///
326/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-active-range-start
327#[syntax(" [ auto | normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]# ")]
328#[derive(
329	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
330)]
331#[declaration_metadata(
332    initial = "auto",
333    applies_to = Elements,
334    percentages = Unknown,
335    property_group = AnimationTriggers,
336    computed_value_type = Unknown,
337    canonical_order = "per grammar",
338)]
339#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
340#[cfg_attr(
341	feature = "css_feature_data",
342	derive(ToCSSFeature),
343	css_feature("css.properties.timeline-trigger-active-range-start")
344)]
345#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
346#[derive(csskit_derives::NodeWithMetadata)]
347pub struct TimelineTriggerActiveRangeStartStyleValue<'a>;
348
349/// Represents the style value for `timeline-trigger-name` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-name).
350///
351/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
352///
353/// The grammar is defined as:
354///
355/// ```text,ignore
356/// none | <dashed-ident>#
357/// ```
358///
359/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-name
360#[syntax(" none | <dashed-ident># ")]
361#[derive(
362	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
363)]
364#[declaration_metadata(
365    initial = "none",
366    applies_to = Elements,
367    property_group = AnimationTriggers,
368    computed_value_type = AsSpecified,
369    canonical_order = "per grammar",
370)]
371#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
372#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.timeline-trigger-name"))]
373#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
374#[derive(csskit_derives::NodeWithMetadata)]
375pub struct TimelineTriggerNameStyleValue<'a>;
376
377/// Represents the style value for `timeline-trigger-range` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-range).
378///
379/// The grammar is defined as:
380///
381/// ```text,ignore
382/// [ <'timeline-trigger-activation-range'> [ / <'timeline-trigger-active-range'> ]? ]#
383/// ```
384///
385/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-range
386#[syntax(" [ <'timeline-trigger-activation-range'> [ / <'timeline-trigger-active-range'> ]? ]# ")]
387#[derive(
388	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
389)]
390#[declaration_metadata(
391    initial = "see individual properties",
392    inherits = Unknown,
393    applies_to = Unknown,
394    animation_type = Unknown,
395    percentages = Unknown,
396    property_group = AnimationTriggers,
397    computed_value_type = Unknown,
398    canonical_order = "per grammar",
399)]
400#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
401#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.timeline-trigger-range"))]
402#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
403#[derive(csskit_derives::NodeWithMetadata)]
404pub struct TimelineTriggerRangeStyleValue<'a>;
405
406/// Represents the style value for `timeline-trigger-source` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-source).
407///
408/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
409///
410/// The grammar is defined as:
411///
412/// ```text,ignore
413/// <single-animation-timeline>#
414/// ```
415///
416/// https://drafts.csswg.org/animation-triggers-1/#timeline-trigger-source
417#[syntax(" <single-animation-timeline># ")]
418#[derive(
419	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
420)]
421#[declaration_metadata(
422    initial = "auto",
423    applies_to = Elements,
424    property_group = AnimationTriggers,
425    computed_value_type = AsSpecified,
426    canonical_order = "per grammar",
427)]
428#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
429#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.timeline-trigger-source"))]
430#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
431#[derive(csskit_derives::NodeWithMetadata)]
432pub struct TimelineTriggerSourceStyleValue<'a>;
433
434/// Represents the style value for `trigger-scope` as defined in [animation-triggers-1](https://drafts.csswg.org/animation-triggers-1/#trigger-scope).
435///
436/// Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.
437///
438/// The grammar is defined as:
439///
440/// ```text,ignore
441/// none | all | <dashed-ident>#
442/// ```
443///
444/// https://drafts.csswg.org/animation-triggers-1/#trigger-scope
445#[syntax(" none | all | <dashed-ident># ")]
446#[derive(
447	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
448)]
449#[declaration_metadata(
450    initial = "none",
451    applies_to = Elements,
452    property_group = AnimationTriggers,
453    computed_value_type = AsSpecified,
454    canonical_order = "per grammar",
455)]
456#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
457#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.trigger-scope"))]
458#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
459#[derive(csskit_derives::NodeWithMetadata)]
460pub enum TriggerScopeStyleValue<'a> {}