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/40527902c4d0840cdb7a808c8cd42302be1c3bc8
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<'a> {}
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<'a>;
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 = PositionTryOrder|PositionTryFallbacks,
150    property_group = AnchorPosition,
151    computed_value_type = Unknown,
152    canonical_order = "per grammar",
153    box_portion = Position,
154)]
155#[declaration_writes(PositionTryOrder?, PositionTryFallbacks)]
156#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
157#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-try"))]
158#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
159#[derive(csskit_derives::NodeWithMetadata)]
160pub struct PositionTryStyleValue<'a>;
161
162/// 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).
163///
164/// 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.
165///
166/// The grammar is defined as:
167///
168/// ```text,ignore
169/// none | [ [<dashed-ident> || <try-tactic>] | <position-area> ]#
170/// ```
171///
172/// https://drafts.csswg.org/css-anchor-position-2/#position-try-fallbacks
173#[syntax(" none | [ [<dashed-ident> || <try-tactic>] | <position-area> ]# ")]
174#[derive(
175	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
176)]
177#[declaration_metadata(
178    initial = "none",
179    applies_to = AbsPos,
180    animation_type = Discrete,
181    shorthands = PositionTry,
182    property_group = AnchorPosition,
183    computed_value_type = AsSpecified,
184    canonical_order = "per grammar",
185    box_portion = Position,
186)]
187#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
188#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-try-fallbacks"))]
189#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
190#[derive(csskit_derives::NodeWithMetadata)]
191pub struct PositionTryFallbacksStyleValue<'a>;
192
193/// 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).
194///
195/// 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.
196///
197/// The grammar is defined as:
198///
199/// ```text,ignore
200/// normal | <try-size>
201/// ```
202///
203/// https://drafts.csswg.org/css-anchor-position-2/#position-try-order
204#[syntax(" normal | <try-size> ")]
205#[derive(
206	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
207)]
208#[declaration_metadata(
209    initial = "normal",
210    applies_to = AbsPos,
211    animation_type = Discrete,
212    shorthands = PositionTry,
213    property_group = AnchorPosition,
214    computed_value_type = AsSpecified,
215    canonical_order = "per grammar",
216    box_portion = Position,
217)]
218#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
219#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-try-order"))]
220#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
221#[derive(csskit_derives::NodeWithMetadata)]
222pub struct PositionTryOrderStyleValue<'a>;
223
224/// Represents the style value for `position-visibility` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-visibility).
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/// always | [ anchor-valid || anchor-visible || no-overflow ]
232/// ```
233///
234/// https://drafts.csswg.org/css-anchor-position-2/#position-visibility
235#[syntax(" always | [ anchor-valid || anchor-visible || no-overflow ] ")]
236#[derive(
237	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
238)]
239#[declaration_metadata(
240    initial = "anchor-visible",
241    applies_to = AbsPos,
242    animation_type = Discrete,
243    property_group = AnchorPosition,
244    computed_value_type = AsSpecified,
245    canonical_order = "per grammar",
246    box_portion = Position,
247)]
248#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
249#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-visibility"))]
250#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
251#[derive(csskit_derives::NodeWithMetadata)]
252pub enum PositionVisibilityStyleValue<'a> {}