Skip to main content

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