css_ast/values/position/
mod.rs

1#![allow(warnings)]
2//! https://drafts.csswg.org/css-position-4/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7/// Represents the style value for `bottom` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#bottom).
8///
9/// The physical CSS properties, top, right, bottom, and left, set the inset position of an element relative to the corresponding side of a container determined by the element's position property.
10///
11/// The grammar is defined as:
12///
13/// ```text,ignore
14/// auto | <length-percentage>
15/// ```
16///
17/// https://drafts.csswg.org/css-position-4/#bottom
18#[syntax(" auto | <length-percentage> ")]
19#[derive(
20	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
21)]
22#[declaration_metadata(
23    initial = "auto",
24    applies_to = Unknown,
25    percentages = ContainingBlock,
26    animation_type = ByComputedValue,
27    property_group = Position,
28    computed_value_type = Unknown,
29    canonical_order = "per grammar",
30    logical_property_group = Inset,
31    box_side = Bottom,
32    box_portion = Position,
33)]
34#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
35#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.bottom"))]
36#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
37pub struct BottomStyleValue;
38
39/// Represents the style value for `inset` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#inset).
40///
41/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
42///
43/// The grammar is defined as:
44///
45/// ```text,ignore
46/// <'top'>{1,4}
47/// ```
48///
49/// https://drafts.csswg.org/css-position-4/#inset
50#[syntax(" <'top'>{1,4} ")]
51#[derive(
52	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
53)]
54#[declaration_metadata(
55    initial = "auto",
56    applies_to = Unknown,
57    percentages = Unknown,
58    animation_type = ByComputedValue,
59    property_group = Position,
60    computed_value_type = Unknown,
61    canonical_order = "per grammar",
62    box_portion = Position,
63)]
64#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
65#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inset"))]
66#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
67pub struct InsetStyleValue;
68
69/// Represents the style value for `inset-block` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#inset-block).
70///
71/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
72///
73/// The grammar is defined as:
74///
75/// ```text,ignore
76/// <'top'>{1,2}
77/// ```
78///
79/// https://drafts.csswg.org/css-position-4/#inset-block
80#[syntax(" <'top'>{1,2} ")]
81#[derive(
82	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
83)]
84#[declaration_metadata(
85    initial = "auto",
86    applies_to = Unknown,
87    percentages = Unknown,
88    animation_type = ByComputedValue,
89    property_group = Position,
90    computed_value_type = Unknown,
91    canonical_order = "per grammar",
92    box_side = BlockStart|BlockEnd,
93    box_portion = Position,
94)]
95#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
96#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inset-block"))]
97#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
98pub struct InsetBlockStyleValue;
99
100/// Represents the style value for `inset-block-end` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#inset-block-end).
101///
102/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
103///
104/// The grammar is defined as:
105///
106/// ```text,ignore
107/// auto | <length-percentage>
108/// ```
109///
110/// https://drafts.csswg.org/css-position-4/#inset-block-end
111#[syntax(" auto | <length-percentage> ")]
112#[derive(
113	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
114)]
115#[declaration_metadata(
116    initial = "auto",
117    applies_to = Unknown,
118    percentages = ContainingBlock,
119    animation_type = ByComputedValue,
120    property_group = Position,
121    computed_value_type = Unknown,
122    canonical_order = "per grammar",
123    logical_property_group = Inset,
124    box_side = BlockEnd,
125    box_portion = Position,
126)]
127#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
128#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inset-block-end"))]
129#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
130pub struct InsetBlockEndStyleValue;
131
132/// Represents the style value for `inset-block-start` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#inset-block-start).
133///
134/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
135///
136/// The grammar is defined as:
137///
138/// ```text,ignore
139/// auto | <length-percentage>
140/// ```
141///
142/// https://drafts.csswg.org/css-position-4/#inset-block-start
143#[syntax(" auto | <length-percentage> ")]
144#[derive(
145	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
146)]
147#[declaration_metadata(
148    initial = "auto",
149    applies_to = Unknown,
150    percentages = ContainingBlock,
151    animation_type = ByComputedValue,
152    property_group = Position,
153    computed_value_type = Unknown,
154    canonical_order = "per grammar",
155    logical_property_group = Inset,
156    box_side = BlockStart,
157    box_portion = Position,
158)]
159#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
160#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inset-block-start"))]
161#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
162pub struct InsetBlockStartStyleValue;
163
164/// Represents the style value for `inset-inline` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#inset-inline).
165///
166/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
167///
168/// The grammar is defined as:
169///
170/// ```text,ignore
171/// <'top'>{1,2}
172/// ```
173///
174/// https://drafts.csswg.org/css-position-4/#inset-inline
175#[syntax(" <'top'>{1,2} ")]
176#[derive(
177	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
178)]
179#[declaration_metadata(
180    initial = "auto",
181    applies_to = Unknown,
182    percentages = Unknown,
183    animation_type = ByComputedValue,
184    property_group = Position,
185    computed_value_type = Unknown,
186    canonical_order = "per grammar",
187    box_side = InlineStart|InlineEnd,
188    box_portion = Position,
189)]
190#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
191#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inset-inline"))]
192#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
193pub struct InsetInlineStyleValue;
194
195/// Represents the style value for `inset-inline-end` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#inset-inline-end).
196///
197/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
198///
199/// The grammar is defined as:
200///
201/// ```text,ignore
202/// auto | <length-percentage>
203/// ```
204///
205/// https://drafts.csswg.org/css-position-4/#inset-inline-end
206#[syntax(" auto | <length-percentage> ")]
207#[derive(
208	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
209)]
210#[declaration_metadata(
211    initial = "auto",
212    applies_to = Unknown,
213    percentages = ContainingBlock,
214    animation_type = ByComputedValue,
215    property_group = Position,
216    computed_value_type = Unknown,
217    canonical_order = "per grammar",
218    logical_property_group = Inset,
219    box_side = InlineEnd,
220    box_portion = Position,
221)]
222#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
223#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inset-inline-end"))]
224#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
225pub struct InsetInlineEndStyleValue;
226
227/// Represents the style value for `inset-inline-start` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#inset-inline-start).
228///
229/// CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
230///
231/// The grammar is defined as:
232///
233/// ```text,ignore
234/// auto | <length-percentage>
235/// ```
236///
237/// https://drafts.csswg.org/css-position-4/#inset-inline-start
238#[syntax(" auto | <length-percentage> ")]
239#[derive(
240	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
241)]
242#[declaration_metadata(
243    initial = "auto",
244    applies_to = Unknown,
245    percentages = ContainingBlock,
246    animation_type = ByComputedValue,
247    property_group = Position,
248    computed_value_type = Unknown,
249    canonical_order = "per grammar",
250    logical_property_group = Inset,
251    box_side = InlineStart,
252    box_portion = Position,
253)]
254#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
255#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inset-inline-start"))]
256#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
257pub struct InsetInlineStartStyleValue;
258
259/// Represents the style value for `left` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#left).
260///
261/// The physical CSS properties, top, right, bottom, and left, set the inset position of an element relative to the corresponding side of a container determined by the element's position property.
262///
263/// The grammar is defined as:
264///
265/// ```text,ignore
266/// auto | <length-percentage>
267/// ```
268///
269/// https://drafts.csswg.org/css-position-4/#left
270#[syntax(" auto | <length-percentage> ")]
271#[derive(
272	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
273)]
274#[declaration_metadata(
275    initial = "auto",
276    applies_to = Unknown,
277    percentages = ContainingBlock,
278    animation_type = ByComputedValue,
279    property_group = Position,
280    computed_value_type = Unknown,
281    canonical_order = "per grammar",
282    logical_property_group = Inset,
283    box_side = Left,
284    box_portion = Position,
285)]
286#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
287#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.left"))]
288#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
289pub struct LeftStyleValue;
290
291/// Represents the style value for `overlay` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#overlay).
292///
293/// The overlay CSS property, used as an allow-discrete CSS transition, prevents a top layer element, such as a popover or a <dialog>, from being removed from the top layer before it has finished animating. You can't set the value of the overlay property; only use it as transition property.
294///
295/// The grammar is defined as:
296///
297/// ```text,ignore
298/// none | auto
299/// ```
300///
301/// https://drafts.csswg.org/css-position-4/#overlay
302#[syntax(" none | auto ")]
303#[derive(
304	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
305)]
306#[declaration_metadata(
307    initial = "none",
308    applies_to = Elements,
309    animation_type = Unknown,
310    property_group = Position,
311    computed_value_type = AsSpecified,
312    canonical_order = "per grammar",
313)]
314#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
315#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.overlay"))]
316#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
317pub enum OverlayStyleValue {}
318
319/// Represents the style value for `position` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#position).
320///
321/// The position CSS property sets the origin position of an element to an element, the element's scrollport, or the viewport.
322///
323/// The grammar is defined as:
324///
325/// ```text,ignore
326/// static | relative | absolute | sticky | fixed
327/// ```
328///
329/// https://drafts.csswg.org/css-position-4/#position
330#[syntax(" static | relative | absolute | sticky | fixed ")]
331#[derive(
332	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
333)]
334#[declaration_metadata(
335    initial = "static",
336    applies_to = Unknown,
337    animation_type = Discrete,
338    property_group = Position,
339    computed_value_type = Unknown,
340    canonical_order = "per grammar",
341    box_portion = Position,
342)]
343#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
344#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position"))]
345#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
346pub enum PositionStyleValue {}
347
348/// Represents the style value for `right` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#right).
349///
350/// The physical CSS properties, top, right, bottom, and left, set the inset position of an element relative to the corresponding side of a container determined by the element's position property.
351///
352/// The grammar is defined as:
353///
354/// ```text,ignore
355/// auto | <length-percentage>
356/// ```
357///
358/// https://drafts.csswg.org/css-position-4/#right
359#[syntax(" auto | <length-percentage> ")]
360#[derive(
361	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
362)]
363#[declaration_metadata(
364    initial = "auto",
365    applies_to = Unknown,
366    percentages = ContainingBlock,
367    animation_type = ByComputedValue,
368    property_group = Position,
369    computed_value_type = Unknown,
370    canonical_order = "per grammar",
371    logical_property_group = Inset,
372    box_side = Right,
373    box_portion = Position,
374)]
375#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
376#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.right"))]
377#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
378pub struct RightStyleValue;
379
380/// Represents the style value for `top` as defined in [css-position-4](https://drafts.csswg.org/css-position-4/#top).
381///
382/// The physical CSS properties, top, right, bottom, and left, set the inset position of an element relative to the corresponding side of a container determined by the element's position property.
383///
384/// The grammar is defined as:
385///
386/// ```text,ignore
387/// auto | <length-percentage>
388/// ```
389///
390/// https://drafts.csswg.org/css-position-4/#top
391#[syntax(" auto | <length-percentage> ")]
392#[derive(
393	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
394)]
395#[declaration_metadata(
396    initial = "auto",
397    applies_to = Unknown,
398    percentages = ContainingBlock,
399    animation_type = ByComputedValue,
400    property_group = Position,
401    computed_value_type = Unknown,
402    canonical_order = "per grammar",
403    logical_property_group = Inset,
404    box_side = Top,
405    box_portion = Position,
406)]
407#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
408#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.top"))]
409#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
410pub struct TopStyleValue;