css_ast/values/transitions/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/7e27ad7484307dfdbe9d0e18ad19d02859389688
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#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
34#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition"))]
35#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
36#[derive(csskit_derives::NodeWithMetadata)]
37pub struct TransitionStyleValue<'a>;
38
39/// Represents the style value for `transition-behavior` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-behavior).
40///
41/// 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%.
42///
43/// The grammar is defined as:
44///
45/// ```text,ignore
46/// <transition-behavior-value>#
47/// ```
48///
49/// https://drafts.csswg.org/css-transitions-2/#transition-behavior
50#[syntax(" <transition-behavior-value># ")]
51#[derive(
52	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
53)]
54#[declaration_metadata(
55    initial = "normal",
56    applies_to = Elements,
57    shorthand_group = Transition,
58    property_group = Transitions,
59    computed_value_type = AsSpecified,
60    canonical_order = "per grammar",
61)]
62#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
63#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition-behavior"))]
64#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
65#[derive(csskit_derives::NodeWithMetadata)]
66pub struct TransitionBehaviorStyleValue<'a>;
67
68/// Represents the style value for `transition-delay` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-delay).
69///
70/// 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.
71///
72/// The grammar is defined as:
73///
74/// ```text,ignore
75/// <time>#
76/// ```
77///
78/// https://drafts.csswg.org/css-transitions-2/#transition-delay
79#[syntax(" <time># ")]
80#[derive(
81	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
82)]
83#[declaration_metadata(
84    initial = "0s",
85    applies_to = Elements,
86    shorthand_group = Transition,
87    property_group = Transitions,
88    computed_value_type = Unknown,
89    canonical_order = "per grammar",
90)]
91#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
92#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition-delay"))]
93#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
94#[derive(csskit_derives::NodeWithMetadata)]
95pub struct TransitionDelayStyleValue<'a>;
96
97/// Represents the style value for `transition-duration` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-duration).
98///
99/// 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.
100///
101/// The grammar is defined as:
102///
103/// ```text,ignore
104/// <time [0s,∞]>#
105/// ```
106///
107/// https://drafts.csswg.org/css-transitions-2/#transition-duration
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    shorthand_group = Transition,
116    property_group = Transitions,
117    computed_value_type = Unknown,
118    canonical_order = "per grammar",
119)]
120#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
121#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition-duration"))]
122#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
123#[derive(csskit_derives::NodeWithMetadata)]
124pub struct TransitionDurationStyleValue<'a>;
125
126/// Represents the style value for `transition-property` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-property).
127///
128/// 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.
129///
130/// The grammar is defined as:
131///
132/// ```text,ignore
133/// none | <single-transition-property>#
134/// ```
135///
136/// https://drafts.csswg.org/css-transitions-2/#transition-property
137#[syntax(" none | <single-transition-property># ")]
138#[derive(
139	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
140)]
141#[declaration_metadata(
142    initial = "all",
143    applies_to = Elements,
144    shorthand_group = Transition,
145    property_group = Transitions,
146    computed_value_type = Unknown,
147    canonical_order = "per grammar",
148)]
149#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
150#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.transition-property"))]
151#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
152#[derive(csskit_derives::NodeWithMetadata)]
153pub struct TransitionPropertyStyleValue<'a>;
154
155/// Represents the style value for `transition-timing-function` as defined in [css-transitions-2](https://drafts.csswg.org/css-transitions-2/#transition-timing-function).
156///
157/// 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.
158///
159/// The grammar is defined as:
160///
161/// ```text,ignore
162/// <easing-function>#
163/// ```
164///
165/// https://drafts.csswg.org/css-transitions-2/#transition-timing-function
166#[syntax(" <easing-function># ")]
167#[derive(
168	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
169)]
170#[declaration_metadata(
171    initial = "ease",
172    applies_to = Elements,
173    shorthand_group = Transition,
174    property_group = Transitions,
175    computed_value_type = AsSpecified,
176    canonical_order = "per grammar",
177)]
178#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
179#[cfg_attr(
180	feature = "css_feature_data",
181	derive(ToCSSFeature),
182	css_feature("css.properties.transition-timing-function")
183)]
184#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
185#[derive(csskit_derives::NodeWithMetadata)]
186pub struct TransitionTimingFunctionStyleValue<'a>;