Skip to main content

css_ast/values/align/
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-align-3/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `align-content` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#align-content).
11///
12/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>
18/// ```
19///
20/// https://drafts.csswg.org/css-align-3/#align-content
21#[syntax(" normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "normal",
27    applies_to = Unknown,
28    animation_type = Discrete,
29    shorthands = PlaceContent,
30    property_group = Align,
31    computed_value_type = Unknown,
32    canonical_order = "per grammar",
33)]
34#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
35#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.align-content"))]
36#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
37#[derive(csskit_derives::NodeWithMetadata)]
38pub enum AlignContentStyleValue<'a> {}
39
40/// Represents the style value for `align-items` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#align-items).
41///
42/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
43///
44/// The grammar is defined as:
45///
46/// ```text,ignore
47/// normal | stretch | <baseline-position> | <overflow-position>? <self-position>
48/// ```
49///
50/// https://drafts.csswg.org/css-align-3/#align-items
51#[syntax(" normal | stretch | <baseline-position> | <overflow-position>? <self-position> ")]
52#[derive(
53	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
54)]
55#[declaration_metadata(
56    initial = "normal",
57    applies_to = Elements,
58    animation_type = Discrete,
59    shorthands = PlaceItems,
60    property_group = Align,
61    computed_value_type = Unknown,
62    canonical_order = "per grammar",
63)]
64#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
65#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.align-items"))]
66#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
67#[derive(csskit_derives::NodeWithMetadata)]
68pub enum AlignItemsStyleValue<'a> {}
69
70/// Represents the style value for `align-self` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#align-self).
71///
72/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
73///
74/// The grammar is defined as:
75///
76/// ```text,ignore
77/// auto | <overflow-position>? [ normal | <self-position> ]| stretch | <baseline-position>
78/// ```
79///
80/// https://drafts.csswg.org/css-align-3/#align-self
81#[syntax(" auto | <overflow-position>? [ normal | <self-position> ]| stretch | <baseline-position> ")]
82#[derive(
83	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
84)]
85#[declaration_metadata(
86    initial = "auto",
87    applies_to = Unknown,
88    animation_type = Discrete,
89    shorthands = PlaceSelf,
90    property_group = Align,
91    computed_value_type = Unknown,
92    canonical_order = "per grammar",
93)]
94#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
95#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.align-self"))]
96#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
97#[derive(csskit_derives::NodeWithMetadata)]
98pub enum AlignSelfStyleValue<'a> {}
99
100/// Represents the style value for `justify-content` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#justify-content).
101///
102/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
103///
104/// The grammar is defined as:
105///
106/// ```text,ignore
107/// normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]
108/// ```
109///
110/// https://drafts.csswg.org/css-align-3/#justify-content
111#[syntax(" normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ")]
112#[derive(
113	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
114)]
115#[declaration_metadata(
116    initial = "normal",
117    applies_to = Unknown,
118    animation_type = Discrete,
119    shorthands = PlaceContent,
120    property_group = Align,
121    computed_value_type = Unknown,
122    canonical_order = "per grammar",
123)]
124#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
125#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.justify-content"))]
126#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
127#[derive(csskit_derives::NodeWithMetadata)]
128pub enum JustifyContentStyleValue<'a> {}
129
130/// Represents the style value for `justify-items` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#justify-items).
131///
132/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
133///
134/// The grammar is defined as:
135///
136/// ```text,ignore
137/// normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]
138/// ```
139///
140/// https://drafts.csswg.org/css-align-3/#justify-items
141#[syntax(
142	" normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ] "
143)]
144#[derive(
145	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
146)]
147#[declaration_metadata(
148    initial = "legacy",
149    applies_to = Elements,
150    animation_type = Discrete,
151    shorthands = PlaceItems,
152    property_group = Align,
153    computed_value_type = Unknown,
154    canonical_order = "per grammar",
155)]
156#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
157#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.justify-items"))]
158#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
159#[derive(csskit_derives::NodeWithMetadata)]
160pub enum JustifyItemsStyleValue<'a> {}
161
162/// Represents the style value for `justify-self` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#justify-self).
163///
164/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
165///
166/// The grammar is defined as:
167///
168/// ```text,ignore
169/// auto | <overflow-position>? [ normal | <self-position> | left | right ] | stretch | <baseline-position>
170/// ```
171///
172/// https://drafts.csswg.org/css-align-3/#justify-self
173#[syntax(" auto | <overflow-position>? [ normal | <self-position> | left | right ] | stretch | <baseline-position> ")]
174#[derive(
175	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
176)]
177#[declaration_metadata(
178    initial = "auto",
179    applies_to = Unknown,
180    animation_type = Discrete,
181    shorthands = PlaceSelf,
182    property_group = Align,
183    computed_value_type = Unknown,
184    canonical_order = "per grammar",
185)]
186#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
187#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.justify-self"))]
188#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
189#[derive(csskit_derives::NodeWithMetadata)]
190pub enum JustifySelfStyleValue<'a> {}
191
192/// Represents the style value for `place-content` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#place-content).
193///
194/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
195///
196/// The grammar is defined as:
197///
198/// ```text,ignore
199/// <'align-content'> <'justify-content'>?
200/// ```
201///
202/// https://drafts.csswg.org/css-align-3/#place-content
203#[syntax(" <'align-content'> <'justify-content'>? ")]
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 = Unknown,
210    animation_type = Discrete,
211    longhands = AlignContent|JustifyContent,
212    property_group = Align,
213    computed_value_type = Unknown,
214    canonical_order = "per grammar",
215)]
216#[declaration_writes(repeat)]
217#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
218#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.place-content"))]
219#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
220#[derive(csskit_derives::NodeWithMetadata)]
221pub struct PlaceContentStyleValue<'a>;
222
223/// Represents the style value for `place-items` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#place-items).
224///
225/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
226///
227/// The grammar is defined as:
228///
229/// ```text,ignore
230/// <'align-items'> <'justify-items'>?
231/// ```
232///
233/// https://drafts.csswg.org/css-align-3/#place-items
234#[syntax(" <'align-items'> <'justify-items'>? ")]
235#[derive(
236	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
237)]
238#[declaration_metadata(
239    initial = "see individual properties",
240    applies_to = Elements,
241    animation_type = Discrete,
242    longhands = AlignItems|JustifyItems,
243    property_group = Align,
244    computed_value_type = Unknown,
245    canonical_order = "per grammar",
246)]
247#[declaration_writes(repeat)]
248#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
249#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.place-items"))]
250#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
251#[derive(csskit_derives::NodeWithMetadata)]
252pub struct PlaceItemsStyleValue<'a>;
253
254/// Represents the style value for `place-self` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#place-self).
255///
256/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
257///
258/// The grammar is defined as:
259///
260/// ```text,ignore
261/// <'align-self'> <'justify-self'>?
262/// ```
263///
264/// https://drafts.csswg.org/css-align-3/#place-self
265#[syntax(" <'align-self'> <'justify-self'>? ")]
266#[derive(
267	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
268)]
269#[declaration_metadata(
270    initial = "auto",
271    applies_to = Unknown,
272    animation_type = Discrete,
273    longhands = AlignSelf|JustifySelf,
274    property_group = Align,
275    computed_value_type = Unknown,
276    canonical_order = "per grammar",
277)]
278#[declaration_writes(repeat)]
279#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
280#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.place-self"))]
281#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
282#[derive(csskit_derives::NodeWithMetadata)]
283pub struct PlaceSelfStyleValue<'a>;