css_ast/values/anchor_position/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-anchor-position-2/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `anchor-name` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#anchor-name).
11///
12/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// none | <dashed-ident>#
18/// ```
19///
20/// https://drafts.csswg.org/css-anchor-position-2/#anchor-name
21#[syntax(" none | <dashed-ident># ")]
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 = Unknown,
28 animation_type = Discrete,
29 property_group = AnchorPosition,
30 computed_value_type = AsSpecified,
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.anchor-name"))]
35#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
36#[derive(csskit_derives::NodeWithMetadata)]
37pub struct AnchorNameStyleValue<'a>;
38
39/// Represents the style value for `anchor-scope` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#anchor-scope).
40///
41/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
42///
43/// The grammar is defined as:
44///
45/// ```text,ignore
46/// none | all | <dashed-ident>#
47/// ```
48///
49/// https://drafts.csswg.org/css-anchor-position-2/#anchor-scope
50#[syntax(" none | all | <dashed-ident># ")]
51#[derive(
52 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
53)]
54#[declaration_metadata(
55 initial = "none",
56 applies_to = Elements,
57 animation_type = Discrete,
58 property_group = AnchorPosition,
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.anchor-scope"))]
64#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
65#[derive(csskit_derives::NodeWithMetadata)]
66pub enum AnchorScopeStyleValue<'a> {}
67
68/// Represents the style value for `position-anchor` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-anchor).
69///
70/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
71///
72/// The grammar is defined as:
73///
74/// ```text,ignore
75/// none | auto | <anchor-name>
76/// ```
77///
78/// https://drafts.csswg.org/css-anchor-position-2/#position-anchor
79#[syntax(" none | auto | <anchor-name> ")]
80#[derive(
81 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
82)]
83#[declaration_metadata(
84 initial = "none",
85 applies_to = AbsPos,
86 animation_type = Discrete,
87 property_group = AnchorPosition,
88 computed_value_type = AsSpecified,
89 canonical_order = "per grammar",
90 box_portion = Position,
91)]
92#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
93#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-anchor"))]
94#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
95#[derive(csskit_derives::NodeWithMetadata)]
96pub struct PositionAnchorStyleValue;
97
98/// Represents the style value for `position-area` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-area).
99///
100/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
101///
102/// The grammar is defined as:
103///
104/// ```text,ignore
105/// none | <position-area>
106/// ```
107///
108/// https://drafts.csswg.org/css-anchor-position-2/#position-area
109#[syntax(" none | <position-area> ")]
110#[derive(
111 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
112)]
113#[declaration_metadata(
114 initial = "none",
115 applies_to = Unknown,
116 animation_type = Unknown,
117 property_group = AnchorPosition,
118 computed_value_type = Unknown,
119 canonical_order = "per grammar",
120 box_portion = Position,
121)]
122#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
123#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-area"))]
124#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
125#[derive(csskit_derives::NodeWithMetadata)]
126pub struct PositionAreaStyleValue;
127
128// /// Represents the style value for `position-try` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-try).
129// ///
130// /// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
131// ///
132// /// The grammar is defined as:
133// ///
134// /// ```text,ignore
135// /// <'position-try-order'>? <'position-try-fallbacks'>
136// /// ```
137// ///
138// /// https://drafts.csswg.org/css-anchor-position-2/#position-try
139// #[syntax(" <'position-try-order'>? <'position-try-fallbacks'> ")]
140// #[derive(
141// Parse,
142// Peek,
143// ToSpan,
144// ToCursors,
145// DeclarationMetadata,
146// SemanticEq,
147// Debug,
148// Clone,
149// PartialEq,
150// Eq,
151// PartialOrd,
152// Ord,
153// Hash,
154// )]
155// #[declaration_metadata(
156// initial = "see individual properties",
157// inherits = Unknown,
158// applies_to = Unknown,
159// animation_type = Unknown,
160// percentages = Unknown,
161// longhands = PositionTryFallbacks|PositionTryOrder,
162// property_group = AnchorPosition,
163// computed_value_type = Unknown,
164// canonical_order = "per grammar",
165// box_portion = Position,
166// )]
167// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
168// #[cfg_attr(
169// feature = "css_feature_data",
170// derive(ToCSSFeature),
171// css_feature("css.properties.position-try")
172// )]
173// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
174// #[derive(csskit_derives::NodeWithMetadata)]
175// pub struct PositionTryStyleValue;
176
177// /// Represents the style value for `position-try-fallbacks` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-try-fallbacks).
178// ///
179// /// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
180// ///
181// /// The grammar is defined as:
182// ///
183// /// ```text,ignore
184// /// none | [ [<dashed-ident> || <try-tactic>] | <position-area> ]#
185// /// ```
186// ///
187// /// https://drafts.csswg.org/css-anchor-position-2/#position-try-fallbacks
188// #[syntax(" none | [ [<dashed-ident> || <try-tactic>] | <position-area> ]# ")]
189// #[derive(
190// Parse,
191// Peek,
192// ToSpan,
193// ToCursors,
194// DeclarationMetadata,
195// SemanticEq,
196// Debug,
197// Clone,
198// PartialEq,
199// Eq,
200// PartialOrd,
201// Ord,
202// Hash,
203// )]
204// #[declaration_metadata(
205// initial = "none",
206// applies_to = AbsPos,
207// animation_type = Discrete,
208// shorthand_group = PositionTry,
209// property_group = AnchorPosition,
210// computed_value_type = AsSpecified,
211// canonical_order = "per grammar",
212// box_portion = Position,
213// )]
214// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
215// #[cfg_attr(
216// feature = "css_feature_data",
217// derive(ToCSSFeature),
218// css_feature("css.properties.position-try-fallbacks")
219// )]
220// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
221// #[derive(csskit_derives::NodeWithMetadata)]
222// pub struct PositionTryFallbacksStyleValue<'a>;
223
224/// Represents the style value for `position-try-order` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-try-order).
225///
226/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
227///
228/// The grammar is defined as:
229///
230/// ```text,ignore
231/// normal | <try-size>
232/// ```
233///
234/// https://drafts.csswg.org/css-anchor-position-2/#position-try-order
235#[syntax(" normal | <try-size> ")]
236#[derive(
237 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
238)]
239#[declaration_metadata(
240 initial = "normal",
241 applies_to = AbsPos,
242 animation_type = Discrete,
243 shorthand_group = PositionTry,
244 property_group = AnchorPosition,
245 computed_value_type = AsSpecified,
246 canonical_order = "per grammar",
247 box_portion = Position,
248)]
249#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
250#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-try-order"))]
251#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
252#[derive(csskit_derives::NodeWithMetadata)]
253pub enum PositionTryOrderStyleValue {}
254
255// /// Represents the style value for `position-visibility` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-visibility).
256// ///
257// /// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
258// ///
259// /// The grammar is defined as:
260// ///
261// /// ```text,ignore
262// /// always | [ anchors-valid || anchors-visible || no-overflow ]
263// /// ```
264// ///
265// /// https://drafts.csswg.org/css-anchor-position-2/#position-visibility
266// #[syntax(" always | [ anchors-valid || anchors-visible || no-overflow ] ")]
267// #[derive(
268// Parse,
269// Peek,
270// ToSpan,
271// ToCursors,
272// DeclarationMetadata,
273// SemanticEq,
274// Debug,
275// Clone,
276// PartialEq,
277// Eq,
278// PartialOrd,
279// Ord,
280// Hash,
281// )]
282// #[declaration_metadata(
283// initial = "anchors-visible",
284// applies_to = AbsPos,
285// animation_type = Discrete,
286// property_group = AnchorPosition,
287// computed_value_type = AsSpecified,
288// canonical_order = "per grammar",
289// box_portion = Position,
290// )]
291// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
292// #[cfg_attr(
293// feature = "css_feature_data",
294// derive(ToCSSFeature),
295// css_feature("css.properties.position-visibility")
296// )]
297// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
298// #[derive(csskit_derives::NodeWithMetadata)]
299// pub enum PositionVisibilityStyleValue {}