Skip to main content

css_ast/values/transitions/
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-transitions-2/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `transition` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition).
11///
12/// The transition shorthand CSS property sets how changes to an element's styles may occur over time. Transitions can be applied to specific CSS properties, all properties, or none.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// <single-transition>#
18/// ```
19///
20/// https://drafts.csswg.org/css-transitions-2/#transition
21#[syntax(" <single-transition># ")]
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 = TransitionBehavior|TransitionDelay|TransitionDuration|TransitionProperty|TransitionTimingFunction,
29    property_group = Transitions,
30    computed_value_type = Unknown,
31    canonical_order = "per grammar",
32)]
33#[declaration_writes(
34    TransitionProperty?,
35    TransitionDuration?,
36    TransitionTimingFunction?,
37    TransitionDelay?,
38    TransitionBehavior?
39)]
40#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
41#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition"))]
42#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
43#[derive(csskit_derives::NodeWithMetadata)]
44pub struct TransitionStyleValue<'a>;
45
46/// Represents the style value for `transition-behavior` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-behavior).
47///
48/// The transition-behavior: allow-discrete CSS declaration allows transitions for properties whose animation behavior is discrete. Such properties can't be interpolated and swap from their start value to the end value at 50%.
49///
50/// The grammar is defined as:
51///
52/// ```text,ignore
53/// <transition-behavior-value>#
54/// ```
55///
56/// https://drafts.csswg.org/css-transitions-2/#transition-behavior
57#[syntax(" <transition-behavior-value># ")]
58#[derive(
59	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
60)]
61#[declaration_metadata(
62    initial = "normal",
63    applies_to = Elements,
64    shorthands = Transition,
65    property_group = Transitions,
66    computed_value_type = AsSpecified,
67    canonical_order = "per grammar",
68)]
69#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
70#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition-behavior"))]
71#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
72#[derive(csskit_derives::NodeWithMetadata)]
73pub struct TransitionBehaviorStyleValue<'a>;
74
75/// Represents the style value for `transition-delay` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-delay).
76///
77/// The transition shorthand CSS property sets how changes to an element's styles may occur over time. Transitions can be applied to specific CSS properties, all properties, or none.
78///
79/// The grammar is defined as:
80///
81/// ```text,ignore
82/// <time>#
83/// ```
84///
85/// https://drafts.csswg.org/css-transitions-2/#transition-delay
86#[syntax(" <time># ")]
87#[derive(
88	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
89)]
90#[declaration_metadata(
91    initial = "0s",
92    applies_to = Elements,
93    shorthands = Transition,
94    property_group = Transitions,
95    computed_value_type = Unknown,
96    canonical_order = "per grammar",
97)]
98#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
99#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition-delay"))]
100#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
101#[derive(csskit_derives::NodeWithMetadata)]
102pub struct TransitionDelayStyleValue<'a>;
103
104/// Represents the style value for `transition-duration` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-duration).
105///
106/// The transition shorthand CSS property sets how changes to an element's styles may occur over time. Transitions can be applied to specific CSS properties, all properties, or none.
107///
108/// The grammar is defined as:
109///
110/// ```text,ignore
111/// <time [0s,∞]>#
112/// ```
113///
114/// https://drafts.csswg.org/css-transitions-2/#transition-duration
115#[syntax(" <time [0s,∞]># ")]
116#[derive(
117	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
118)]
119#[declaration_metadata(
120    initial = "0s",
121    applies_to = Elements,
122    shorthands = Transition,
123    property_group = Transitions,
124    computed_value_type = Unknown,
125    canonical_order = "per grammar",
126)]
127#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
128#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition-duration"))]
129#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
130#[derive(csskit_derives::NodeWithMetadata)]
131pub struct TransitionDurationStyleValue<'a>;
132
133/// Represents the style value for `transition-property` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-property).
134///
135/// The transition shorthand CSS property sets how changes to an element's styles may occur over time. Transitions can be applied to specific CSS properties, all properties, or none.
136///
137/// The grammar is defined as:
138///
139/// ```text,ignore
140/// none | <single-transition-property>#
141/// ```
142///
143/// https://drafts.csswg.org/css-transitions-2/#transition-property
144#[syntax(" none | <single-transition-property># ")]
145#[derive(
146	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
147)]
148#[declaration_metadata(
149    initial = "all",
150    applies_to = Elements,
151    shorthands = Transition,
152    property_group = Transitions,
153    computed_value_type = Unknown,
154    canonical_order = "per grammar",
155)]
156#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
157#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition-property"))]
158#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
159#[derive(csskit_derives::NodeWithMetadata)]
160pub struct TransitionPropertyStyleValue<'a>;
161
162/// Represents the style value for `transition-timing-function` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-timing-function).
163///
164/// The transition shorthand CSS property sets how changes to an element's styles may occur over time. Transitions can be applied to specific CSS properties, all properties, or none.
165///
166/// The grammar is defined as:
167///
168/// ```text,ignore
169/// <easing-function>#
170/// ```
171///
172/// https://drafts.csswg.org/css-transitions-2/#transition-timing-function
173#[syntax(" <easing-function># ")]
174#[derive(
175	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
176)]
177#[declaration_metadata(
178    initial = "ease",
179    applies_to = Elements,
180    shorthands = Transition,
181    property_group = Transitions,
182    computed_value_type = AsSpecified,
183    canonical_order = "per grammar",
184)]
185#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
186#[cfg_attr(
187	feature = "css_feature_data",
188	derive(ToCSSFeature),
189	css_feature("css.properties.transition-timing-function")
190)]
191#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
192#[derive(csskit_derives::NodeWithMetadata)]
193pub struct TransitionTimingFunctionStyleValue<'a>;