css_ast/values/anchor_position/
mod.rs

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