Skip to main content

css_ast/values/motion/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/27fd597de31a8c43234f99f58983e4af3d1f9282
3// Do not edit this file directly.
4#![allow(warnings)]
5//! https://drafts.csswg.org/motion-1/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `offset` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset).
11///
12/// The offset CSS property animates an element along a defined motion path.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// [ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?
18/// ```
19///
20/// https://drafts.csswg.org/motion-1/#offset
21#[syntax(
22	" [ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]? "
23)]
24#[derive(
25	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
26)]
27#[declaration_metadata(
28    initial = "see individual properties",
29    inherits = Unknown,
30    applies_to = Unknown,
31    animation_type = Unknown,
32    percentages = Unknown,
33    longhands = OffsetAnchor|OffsetDistance|OffsetPath|OffsetPosition|OffsetRotate,
34    property_group = Motion,
35    computed_value_type = Unknown,
36    canonical_order = "per grammar",
37)]
38#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
39#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.offset"))]
40#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
41#[derive(csskit_derives::NodeWithMetadata)]
42pub enum OffsetStyleValue<'a> {}
43
44/// Represents the style value for `offset-anchor` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-anchor).
45///
46/// The offset CSS property animates an element along a defined motion path.
47///
48/// The grammar is defined as:
49///
50/// ```text,ignore
51/// auto | <position>
52/// ```
53///
54/// https://drafts.csswg.org/motion-1/#offset-anchor
55#[syntax(" auto | <position> ")]
56#[derive(
57	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
58)]
59#[declaration_metadata(
60    initial = "auto",
61    applies_to = Unknown,
62    animation_type = ByComputedValue,
63    percentages = ReferenceBox,
64    shorthand_group = Offset,
65    property_group = Motion,
66    computed_value_type = Unknown,
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.offset-anchor"))]
71#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
72#[derive(csskit_derives::NodeWithMetadata)]
73pub struct OffsetAnchorStyleValue<'a>;
74
75/// Represents the style value for `offset-distance` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-distance).
76///
77/// The offset CSS property animates an element along a defined motion path.
78///
79/// The grammar is defined as:
80///
81/// ```text,ignore
82/// <length-percentage>
83/// ```
84///
85/// https://drafts.csswg.org/motion-1/#offset-distance
86#[syntax(" <length-percentage> ")]
87#[derive(
88	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
89)]
90#[declaration_metadata(
91    initial = "0",
92    applies_to = Unknown,
93    animation_type = ByComputedValue,
94    percentages = Unknown,
95    shorthand_group = Offset,
96    property_group = Motion,
97    computed_value_type = Unknown,
98    canonical_order = "per grammar",
99)]
100#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
101#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.offset-distance"))]
102#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
103#[derive(csskit_derives::NodeWithMetadata)]
104pub struct OffsetDistanceStyleValue<'a>;
105
106/// Represents the style value for `offset-path` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-path).
107///
108/// The offset CSS property animates an element along a defined motion path.
109///
110/// The grammar is defined as:
111///
112/// ```text,ignore
113/// none | <offset-path> || <coord-box>
114/// ```
115///
116/// https://drafts.csswg.org/motion-1/#offset-path
117#[syntax(" none | <offset-path> || <coord-box> ")]
118#[derive(
119	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
120)]
121#[declaration_metadata(
122    initial = "none",
123    applies_to = Unknown,
124    animation_type = ByComputedValue,
125    shorthand_group = Offset,
126    property_group = Motion,
127    computed_value_type = AsSpecified,
128    canonical_order = "per grammar",
129)]
130#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
131#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.offset-path"))]
132#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
133#[derive(csskit_derives::NodeWithMetadata)]
134pub struct OffsetPathStyleValue<'a>;
135
136/// Represents the style value for `offset-position` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-position).
137///
138/// The offset CSS property animates an element along a defined motion path.
139///
140/// The grammar is defined as:
141///
142/// ```text,ignore
143/// normal | auto | <position>
144/// ```
145///
146/// https://drafts.csswg.org/motion-1/#offset-position
147#[syntax(" normal | auto | <position> ")]
148#[derive(
149	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
150)]
151#[declaration_metadata(
152    initial = "normal",
153    applies_to = Unknown,
154    animation_type = ByComputedValue,
155    percentages = Unknown,
156    shorthand_group = Offset,
157    property_group = Motion,
158    computed_value_type = Unknown,
159    canonical_order = "per grammar",
160)]
161#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
162#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.offset-position"))]
163#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
164#[derive(csskit_derives::NodeWithMetadata)]
165pub enum OffsetPositionStyleValue<'a> {}
166
167/// Represents the style value for `offset-rotate` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-rotate).
168///
169/// The offset CSS property animates an element along a defined motion path.
170///
171/// The grammar is defined as:
172///
173/// ```text,ignore
174/// [ auto | reverse ] || <angle>
175/// ```
176///
177/// https://drafts.csswg.org/motion-1/#offset-rotate
178#[syntax(" [ auto | reverse ] || <angle> ")]
179#[derive(
180	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
181)]
182#[declaration_metadata(
183    initial = "auto",
184    applies_to = Unknown,
185    animation_type = ByComputedValue,
186    shorthand_group = Offset,
187    property_group = Motion,
188    computed_value_type = Unknown,
189    canonical_order = "per grammar",
190)]
191#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
192#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.offset-rotate"))]
193#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
194#[derive(csskit_derives::NodeWithMetadata)]
195pub enum OffsetRotateStyleValue<'a> {}