Skip to main content

css_ast/values/anchor_position/
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/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 | <anchor-name>#
18/// ```
19///
20/// https://drafts.csswg.org/css-anchor-position-2/#anchor-name
21#[syntax(" none | <anchor-name># ")]
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 | <anchor-name>#
47/// ```
48///
49/// https://drafts.csswg.org/css-anchor-position-2/#anchor-scope
50#[syntax(" none | all | <anchor-name># ")]
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/// normal | none | auto | <anchor-name> | match-parent
76/// ```
77///
78/// https://drafts.csswg.org/css-anchor-position-2/#position-anchor
79#[syntax(" normal | none | auto | <anchor-name> | match-parent ")]
80#[derive(
81	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
82)]
83#[declaration_metadata(
84    initial = "normal",
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 enum 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 = Discrete,
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, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
142)]
143#[declaration_metadata(
144    initial = "see individual properties",
145    inherits = Unknown,
146    applies_to = Unknown,
147    animation_type = Unknown,
148    percentages = Unknown,
149    longhands = PositionTryFallbacks|PositionTryOrder,
150    property_group = AnchorPosition,
151    computed_value_type = Unknown,
152    canonical_order = "per grammar",
153    box_portion = Position,
154)]
155#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
156#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-try"))]
157#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
158#[derive(csskit_derives::NodeWithMetadata)]
159pub struct PositionTryStyleValue<'a>;
160
161/// 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).
162///
163/// 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.
164///
165/// The grammar is defined as:
166///
167/// ```text,ignore
168/// none | [ [<dashed-ident> || <try-tactic>] | <position-area> ]#
169/// ```
170///
171/// https://drafts.csswg.org/css-anchor-position-2/#position-try-fallbacks
172#[syntax(" none | [ [<dashed-ident> || <try-tactic>] | <position-area> ]# ")]
173#[derive(
174	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
175)]
176#[declaration_metadata(
177    initial = "none",
178    applies_to = AbsPos,
179    animation_type = Discrete,
180    shorthand_group = PositionTry,
181    property_group = AnchorPosition,
182    computed_value_type = AsSpecified,
183    canonical_order = "per grammar",
184    box_portion = Position,
185)]
186#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
187#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-try-fallbacks"))]
188#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
189#[derive(csskit_derives::NodeWithMetadata)]
190pub struct PositionTryFallbacksStyleValue<'a>;
191
192/// 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).
193///
194/// 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.
195///
196/// The grammar is defined as:
197///
198/// ```text,ignore
199/// normal | <try-size>
200/// ```
201///
202/// https://drafts.csswg.org/css-anchor-position-2/#position-try-order
203#[syntax(" normal | <try-size> ")]
204#[derive(
205	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
206)]
207#[declaration_metadata(
208    initial = "normal",
209    applies_to = AbsPos,
210    animation_type = Discrete,
211    shorthand_group = PositionTry,
212    property_group = AnchorPosition,
213    computed_value_type = AsSpecified,
214    canonical_order = "per grammar",
215    box_portion = Position,
216)]
217#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
218#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-try-order"))]
219#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
220#[derive(csskit_derives::NodeWithMetadata)]
221pub struct PositionTryOrderStyleValue;
222
223/// Represents the style value for `position-visibility` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-visibility).
224///
225/// 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.
226///
227/// The grammar is defined as:
228///
229/// ```text,ignore
230/// always | [ anchor-valid || anchor-visible || no-overflow ]
231/// ```
232///
233/// https://drafts.csswg.org/css-anchor-position-2/#position-visibility
234#[syntax(" always | [ anchor-valid || anchor-visible || no-overflow ] ")]
235#[derive(
236	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
237)]
238#[declaration_metadata(
239    initial = "anchor-visible",
240    applies_to = AbsPos,
241    animation_type = Discrete,
242    property_group = AnchorPosition,
243    computed_value_type = AsSpecified,
244    canonical_order = "per grammar",
245    box_portion = Position,
246)]
247#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
248#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-visibility"))]
249#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
250#[derive(csskit_derives::NodeWithMetadata)]
251pub enum PositionVisibilityStyleValue {}