css_ast/values/align/mod.rs
1#![allow(warnings)]
2//! https://drafts.csswg.org/css-align-3/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7/// Represents the style value for `align-content` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#align-content).
8///
9/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
10///
11/// The grammar is defined as:
12///
13/// ```text,ignore
14/// normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>
15/// ```
16///
17/// https://drafts.csswg.org/css-align-3/#align-content
18#[syntax(" normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ")]
19#[derive(
20 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
21)]
22#[declaration_metadata(
23 initial = "normal",
24 applies_to = Unknown,
25 animation_type = Discrete,
26 property_group = Align,
27 computed_value_type = Unknown,
28 canonical_order = "per grammar",
29)]
30#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
31#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.align-content"))]
32#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
33pub enum AlignContentStyleValue {}
34
35// /// Represents the style value for `align-items` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#align-items).
36// ///
37// /// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
38// ///
39// /// The grammar is defined as:
40// ///
41// /// ```text,ignore
42// /// normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]
43// /// ```
44// ///
45// /// https://drafts.csswg.org/css-align-3/#align-items
46// #[syntax(
47// " normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ] "
48// )]
49// #[derive(
50// Parse,
51// Peek,
52// ToSpan,
53// ToCursors,
54// DeclarationMetadata,
55// SemanticEq,
56// Debug,
57// Clone,
58// PartialEq,
59// Eq,
60// PartialOrd,
61// Ord,
62// Hash,
63// )]
64// #[declaration_metadata(
65// initial = "normal",
66// applies_to = Elements,
67// animation_type = Discrete,
68// property_group = Align,
69// computed_value_type = Unknown,
70// canonical_order = "per grammar",
71// )]
72// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
73// #[cfg_attr(
74// feature = "css_feature_data",
75// derive(ToCSSFeature),
76// css_feature("css.properties.align-items")
77// )]
78// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
79// pub enum AlignItemsStyleValue {}
80
81/// Represents the style value for `align-self` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#align-self).
82///
83/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
84///
85/// The grammar is defined as:
86///
87/// ```text,ignore
88/// auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>
89/// ```
90///
91/// https://drafts.csswg.org/css-align-3/#align-self
92#[syntax(" auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position> ")]
93#[derive(
94 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
95)]
96#[declaration_metadata(
97 initial = "auto",
98 applies_to = Unknown,
99 animation_type = Discrete,
100 property_group = Align,
101 computed_value_type = Unknown,
102 canonical_order = "per grammar",
103)]
104#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
105#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.align-self"))]
106#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
107pub enum AlignSelfStyleValue {}
108
109/// Represents the style value for `column-gap` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#column-gap).
110///
111/// Multi-column layout flows an element's content across one or more columns in a single row, without affecting the display property of its children.
112///
113/// The grammar is defined as:
114///
115/// ```text,ignore
116/// normal | <length-percentage [0,∞]>
117/// ```
118///
119/// https://drafts.csswg.org/css-align-3/#column-gap
120#[syntax(" normal | <length-percentage [0,∞]> ")]
121#[derive(
122 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
123)]
124#[declaration_metadata(
125 initial = "normal",
126 applies_to = Unknown,
127 percentages = Unknown,
128 animation_type = ByComputedValue,
129 property_group = Align,
130 computed_value_type = Unknown,
131 canonical_order = "per grammar",
132)]
133#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
134#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-gap"))]
135#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
136pub enum ColumnGapStyleValue {}
137
138/// Represents the style value for `gap` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#gap).
139///
140/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
141///
142/// The grammar is defined as:
143///
144/// ```text,ignore
145/// <'row-gap'> <'column-gap'>?
146/// ```
147///
148/// https://drafts.csswg.org/css-align-3/#gap
149#[syntax(" <'row-gap'> <'column-gap'>? ")]
150#[derive(
151 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
152)]
153#[declaration_metadata(
154 initial = "see individual properties",
155 applies_to = Unknown,
156 percentages = ContentArea,
157 animation_type = ByComputedValue,
158 property_group = Align,
159 computed_value_type = Unknown,
160 canonical_order = "per grammar",
161)]
162#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
163#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.gap"))]
164#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
165pub struct GapStyleValue;
166
167// /// Represents the style value for `justify-content` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#justify-content).
168// ///
169// /// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
170// ///
171// /// The grammar is defined as:
172// ///
173// /// ```text,ignore
174// /// normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]
175// /// ```
176// ///
177// /// https://drafts.csswg.org/css-align-3/#justify-content
178// #[syntax(
179// " normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] "
180// )]
181// #[derive(
182// Parse,
183// Peek,
184// ToSpan,
185// ToCursors,
186// DeclarationMetadata,
187// SemanticEq,
188// Debug,
189// Clone,
190// PartialEq,
191// Eq,
192// PartialOrd,
193// Ord,
194// Hash,
195// )]
196// #[declaration_metadata(
197// initial = "normal",
198// applies_to = Unknown,
199// animation_type = Discrete,
200// property_group = Align,
201// computed_value_type = Unknown,
202// canonical_order = "per grammar",
203// )]
204// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
205// #[cfg_attr(
206// feature = "css_feature_data",
207// derive(ToCSSFeature),
208// css_feature("css.properties.justify-content")
209// )]
210// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
211// pub enum JustifyContentStyleValue {}
212
213// /// Represents the style value for `justify-items` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#justify-items).
214// ///
215// /// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
216// ///
217// /// The grammar is defined as:
218// ///
219// /// ```text,ignore
220// /// normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]
221// /// ```
222// ///
223// /// https://drafts.csswg.org/css-align-3/#justify-items
224// #[syntax(
225// " normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ] "
226// )]
227// #[derive(
228// Parse,
229// Peek,
230// ToSpan,
231// ToCursors,
232// DeclarationMetadata,
233// SemanticEq,
234// Debug,
235// Clone,
236// PartialEq,
237// Eq,
238// PartialOrd,
239// Ord,
240// Hash,
241// )]
242// #[declaration_metadata(
243// initial = "legacy",
244// applies_to = Elements,
245// animation_type = Discrete,
246// property_group = Align,
247// computed_value_type = Unknown,
248// canonical_order = "per grammar",
249// )]
250// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
251// #[cfg_attr(
252// feature = "css_feature_data",
253// derive(ToCSSFeature),
254// css_feature("css.properties.justify-items")
255// )]
256// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
257// pub enum JustifyItemsStyleValue {}
258
259// /// Represents the style value for `justify-self` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#justify-self).
260// ///
261// /// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
262// ///
263// /// The grammar is defined as:
264// ///
265// /// ```text,ignore
266// /// auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]
267// /// ```
268// ///
269// /// https://drafts.csswg.org/css-align-3/#justify-self
270// #[syntax(
271// " auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] "
272// )]
273// #[derive(
274// Parse,
275// Peek,
276// ToSpan,
277// ToCursors,
278// DeclarationMetadata,
279// SemanticEq,
280// Debug,
281// Clone,
282// PartialEq,
283// Eq,
284// PartialOrd,
285// Ord,
286// Hash,
287// )]
288// #[declaration_metadata(
289// initial = "auto",
290// applies_to = Unknown,
291// animation_type = Discrete,
292// property_group = Align,
293// computed_value_type = Unknown,
294// canonical_order = "per grammar",
295// )]
296// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
297// #[cfg_attr(
298// feature = "css_feature_data",
299// derive(ToCSSFeature),
300// css_feature("css.properties.justify-self")
301// )]
302// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
303// pub enum JustifySelfStyleValue {}
304
305// /// Represents the style value for `place-content` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#place-content).
306// ///
307// /// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
308// ///
309// /// The grammar is defined as:
310// ///
311// /// ```text,ignore
312// /// <'align-content'> <'justify-content'>?
313// /// ```
314// ///
315// /// https://drafts.csswg.org/css-align-3/#place-content
316// #[syntax(" <'align-content'> <'justify-content'>? ")]
317// #[derive(
318// Parse,
319// Peek,
320// ToSpan,
321// ToCursors,
322// DeclarationMetadata,
323// SemanticEq,
324// Debug,
325// Clone,
326// PartialEq,
327// Eq,
328// PartialOrd,
329// Ord,
330// Hash,
331// )]
332// #[declaration_metadata(
333// initial = "normal",
334// applies_to = Unknown,
335// animation_type = Discrete,
336// property_group = Align,
337// computed_value_type = Unknown,
338// canonical_order = "per grammar",
339// )]
340// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
341// #[cfg_attr(
342// feature = "css_feature_data",
343// derive(ToCSSFeature),
344// css_feature("css.properties.place-content")
345// )]
346// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
347// pub struct PlaceContentStyleValue;
348
349// /// Represents the style value for `place-items` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#place-items).
350// ///
351// /// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
352// ///
353// /// The grammar is defined as:
354// ///
355// /// ```text,ignore
356// /// <'align-items'> <'justify-items'>?
357// /// ```
358// ///
359// /// https://drafts.csswg.org/css-align-3/#place-items
360// #[syntax(" <'align-items'> <'justify-items'>? ")]
361// #[derive(
362// Parse,
363// Peek,
364// ToSpan,
365// ToCursors,
366// DeclarationMetadata,
367// SemanticEq,
368// Debug,
369// Clone,
370// PartialEq,
371// Eq,
372// PartialOrd,
373// Ord,
374// Hash,
375// )]
376// #[declaration_metadata(
377// initial = "see individual properties",
378// applies_to = Elements,
379// animation_type = Discrete,
380// property_group = Align,
381// computed_value_type = Unknown,
382// canonical_order = "per grammar",
383// )]
384// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
385// #[cfg_attr(
386// feature = "css_feature_data",
387// derive(ToCSSFeature),
388// css_feature("css.properties.place-items")
389// )]
390// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
391// pub struct PlaceItemsStyleValue;
392
393// /// Represents the style value for `place-self` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#place-self).
394// ///
395// /// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
396// ///
397// /// The grammar is defined as:
398// ///
399// /// ```text,ignore
400// /// <'align-self'> <'justify-self'>?
401// /// ```
402// ///
403// /// https://drafts.csswg.org/css-align-3/#place-self
404// #[syntax(" <'align-self'> <'justify-self'>? ")]
405// #[derive(
406// Parse,
407// Peek,
408// ToSpan,
409// ToCursors,
410// DeclarationMetadata,
411// SemanticEq,
412// Debug,
413// Clone,
414// PartialEq,
415// Eq,
416// PartialOrd,
417// Ord,
418// Hash,
419// )]
420// #[declaration_metadata(
421// initial = "auto",
422// applies_to = Unknown,
423// animation_type = Discrete,
424// property_group = Align,
425// computed_value_type = Unknown,
426// canonical_order = "per grammar",
427// )]
428// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
429// #[cfg_attr(
430// feature = "css_feature_data",
431// derive(ToCSSFeature),
432// css_feature("css.properties.place-self")
433// )]
434// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
435// pub struct PlaceSelfStyleValue;
436
437/// Represents the style value for `row-gap` as defined in [css-align-3](https://drafts.csswg.org/css-align-3/#row-gap).
438///
439/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
440///
441/// The grammar is defined as:
442///
443/// ```text,ignore
444/// normal | <length-percentage [0,∞]>
445/// ```
446///
447/// https://drafts.csswg.org/css-align-3/#row-gap
448#[syntax(" normal | <length-percentage [0,∞]> ")]
449#[derive(
450 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
451)]
452#[declaration_metadata(
453 initial = "normal",
454 applies_to = Unknown,
455 percentages = Unknown,
456 animation_type = ByComputedValue,
457 property_group = Align,
458 computed_value_type = Unknown,
459 canonical_order = "per grammar",
460)]
461#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
462#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.row-gap"))]
463#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
464pub enum RowGapStyleValue {}