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/ddbceaa3cee88f134d557c3051c26fcb5554a535
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,
26//     Peek,
27//     ToSpan,
28//     ToCursors,
29//     DeclarationMetadata,
30//     SemanticEq,
31//     Debug,
32//     Clone,
33//     PartialEq,
34//     Eq,
35//     PartialOrd,
36//     Ord,
37//     Hash,
38// )]
39// #[declaration_metadata(
40//     initial = "see individual properties",
41//     inherits = Unknown,
42//     applies_to = Unknown,
43//     animation_type = Unknown,
44//     percentages = Unknown,
45//     longhands = OffsetAnchor|OffsetDistance|OffsetPath|OffsetPosition|OffsetRotate,
46//     property_group = Motion,
47//     computed_value_type = Unknown,
48//     canonical_order = "per grammar",
49// )]
50// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
51// #[cfg_attr(
52//     feature = "css_feature_data",
53//     derive(ToCSSFeature),
54//     css_feature("css.properties.offset")
55// )]
56// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
57// #[derive(csskit_derives::NodeWithMetadata)]
58// pub struct OffsetStyleValue;
59
60/// Represents the style value for `offset-anchor` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-anchor).
61///
62/// The offset CSS property animates an element along a defined motion path.
63///
64/// The grammar is defined as:
65///
66/// ```text,ignore
67/// auto | <position>
68/// ```
69///
70/// https://drafts.csswg.org/motion-1/#offset-anchor
71#[syntax(" auto | <position> ")]
72#[derive(
73	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
74)]
75#[declaration_metadata(
76    initial = "auto",
77    applies_to = Unknown,
78    animation_type = ByComputedValue,
79    percentages = ReferenceBox,
80    shorthand_group = Offset,
81    property_group = Motion,
82    computed_value_type = Unknown,
83    canonical_order = "per grammar",
84)]
85#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
86#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.offset-anchor"))]
87#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
88#[derive(csskit_derives::NodeWithMetadata)]
89pub struct OffsetAnchorStyleValue;
90
91/// Represents the style value for `offset-distance` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-distance).
92///
93/// The offset CSS property animates an element along a defined motion path.
94///
95/// The grammar is defined as:
96///
97/// ```text,ignore
98/// <length-percentage>
99/// ```
100///
101/// https://drafts.csswg.org/motion-1/#offset-distance
102#[syntax(" <length-percentage> ")]
103#[derive(
104	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
105)]
106#[declaration_metadata(
107    initial = "0",
108    applies_to = Unknown,
109    animation_type = ByComputedValue,
110    percentages = Unknown,
111    shorthand_group = Offset,
112    property_group = Motion,
113    computed_value_type = Unknown,
114    canonical_order = "per grammar",
115)]
116#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
117#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.offset-distance"))]
118#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
119#[derive(csskit_derives::NodeWithMetadata)]
120pub struct OffsetDistanceStyleValue;
121
122/// Represents the style value for `offset-path` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-path).
123///
124/// The offset CSS property animates an element along a defined motion path.
125///
126/// The grammar is defined as:
127///
128/// ```text,ignore
129/// none | <offset-path> || <coord-box>
130/// ```
131///
132/// https://drafts.csswg.org/motion-1/#offset-path
133#[syntax(" none | <offset-path> || <coord-box> ")]
134#[derive(
135	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
136)]
137#[declaration_metadata(
138    initial = "none",
139    applies_to = Unknown,
140    animation_type = ByComputedValue,
141    shorthand_group = Offset,
142    property_group = Motion,
143    computed_value_type = AsSpecified,
144    canonical_order = "per grammar",
145)]
146#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
147#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.offset-path"))]
148#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
149#[derive(csskit_derives::NodeWithMetadata)]
150pub struct OffsetPathStyleValue;
151
152/// Represents the style value for `offset-position` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-position).
153///
154/// The offset CSS property animates an element along a defined motion path.
155///
156/// The grammar is defined as:
157///
158/// ```text,ignore
159/// normal | auto | <position>
160/// ```
161///
162/// https://drafts.csswg.org/motion-1/#offset-position
163#[syntax(" normal | auto | <position> ")]
164#[derive(
165	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
166)]
167#[declaration_metadata(
168    initial = "normal",
169    applies_to = Unknown,
170    animation_type = ByComputedValue,
171    percentages = Unknown,
172    shorthand_group = Offset,
173    property_group = Motion,
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.offset-position"))]
179#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
180#[derive(csskit_derives::NodeWithMetadata)]
181pub enum OffsetPositionStyleValue {}
182
183/// Represents the style value for `offset-rotate` as defined in [motion-1](https://drafts.csswg.org/motion-1/#offset-rotate).
184///
185/// The offset CSS property animates an element along a defined motion path.
186///
187/// The grammar is defined as:
188///
189/// ```text,ignore
190/// [ auto | reverse ] || <angle>
191/// ```
192///
193/// https://drafts.csswg.org/motion-1/#offset-rotate
194#[syntax(" [ auto | reverse ] || <angle> ")]
195#[derive(
196	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
197)]
198#[declaration_metadata(
199    initial = "auto",
200    applies_to = Unknown,
201    animation_type = ByComputedValue,
202    shorthand_group = Offset,
203    property_group = Motion,
204    computed_value_type = Unknown,
205    canonical_order = "per grammar",
206)]
207#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
208#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.offset-rotate"))]
209#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
210#[derive(csskit_derives::NodeWithMetadata)]
211pub enum OffsetRotateStyleValue {}