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