Skip to main content

css_ast/values/grid/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/27fd597de31a8c43234f99f58983e4af3d1f9282
3// Do not edit this file directly.
4#![allow(warnings)]
5//! https://drafts.csswg.org/css-grid-3/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `flow-tolerance` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#flow-tolerance).
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// normal | <length-percentage [0,∞]> | infinite
16/// ```
17///
18/// https://drafts.csswg.org/css-grid-3/#flow-tolerance
19#[syntax(" normal | <length-percentage [0,∞]> | infinite ")]
20#[derive(
21	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
22)]
23#[declaration_metadata(
24    initial = "normal",
25    applies_to = Unknown,
26    animation_type = Length,
27    percentages = Unknown,
28    property_group = Grid,
29    computed_value_type = Unknown,
30    canonical_order = "per grammar",
31)]
32#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
33#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.flow-tolerance"))]
34#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
35#[derive(csskit_derives::NodeWithMetadata)]
36pub enum FlowToleranceStyleValue<'a> {}
37
38/// Represents the style value for `grid` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid).
39///
40/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
41///
42/// The grammar is defined as:
43///
44/// ```text,ignore
45/**<'grid-template'> |
46<'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? |
47[ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>*/
48/// ```
49///
50/// https://drafts.csswg.org/css-grid-3/#grid
51#[syntax(
52	" <'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'> "
53)]
54#[derive(
55	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
56)]
57#[declaration_metadata(
58    initial = "none",
59    inherits = Unknown,
60    applies_to = Grid,
61    animation_type = Unknown,
62    percentages = Unknown,
63    longhands = GridAutoColumns|GridAutoFlow|GridAutoRows|GridTemplateAreas|GridTemplateColumns|GridTemplateRows,
64    property_group = Grid,
65    computed_value_type = Unknown,
66    canonical_order = "per grammar",
67)]
68#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
69#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid"))]
70#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
71#[derive(csskit_derives::NodeWithMetadata)]
72pub enum GridStyleValue<'a> {}
73
74/// Represents the style value for `grid-area` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-area).
75///
76/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
77///
78/// The grammar is defined as:
79///
80/// ```text,ignore
81/// <grid-line> [ / <grid-line> ]{0,3}
82/// ```
83///
84/// https://drafts.csswg.org/css-grid-3/#grid-area
85#[syntax(" <grid-line> [ / <grid-line> ]{0,3} ")]
86#[derive(
87	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
88)]
89#[declaration_metadata(
90    initial = "auto",
91    applies_to = Unknown,
92    animation_type = Discrete,
93    longhands = GridColumnEnd|GridColumnStart|GridRowEnd|GridRowStart,
94    property_group = Grid,
95    computed_value_type = Unknown,
96    canonical_order = "per grammar",
97)]
98#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
99#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-area"))]
100#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
101#[derive(csskit_derives::NodeWithMetadata)]
102pub struct GridAreaStyleValue<'a>;
103
104/// Represents the style value for `grid-auto-columns` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-auto-columns).
105///
106/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
107///
108/// The grammar is defined as:
109///
110/// ```text,ignore
111/// <track-size>+
112/// ```
113///
114/// https://drafts.csswg.org/css-grid-3/#grid-auto-columns
115#[syntax(" <track-size>+ ")]
116#[derive(
117	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
118)]
119#[declaration_metadata(
120    initial = "auto",
121    applies_to = Grid,
122    animation_type = Discrete,
123    percentages = Unknown,
124    shorthand_group = Grid,
125    property_group = Grid,
126    computed_value_type = Unknown,
127    canonical_order = "per grammar",
128)]
129#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
130#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-auto-columns"))]
131#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
132#[derive(csskit_derives::NodeWithMetadata)]
133pub struct GridAutoColumnsStyleValue<'a>;
134
135/// Represents the style value for `grid-auto-flow` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-auto-flow).
136///
137/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
138///
139/// The grammar is defined as:
140///
141/// ```text,ignore
142/// [ row | column ] || dense
143/// ```
144///
145/// https://drafts.csswg.org/css-grid-3/#grid-auto-flow
146#[syntax(" [ row | column ] || dense ")]
147#[derive(
148	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
149)]
150#[declaration_metadata(
151    initial = "row",
152    applies_to = Grid,
153    animation_type = Discrete,
154    shorthand_group = Grid,
155    property_group = Grid,
156    computed_value_type = Unknown,
157    canonical_order = "per grammar",
158)]
159#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
160#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-auto-flow"))]
161#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
162#[derive(csskit_derives::NodeWithMetadata)]
163pub enum GridAutoFlowStyleValue<'a> {}
164
165/// Represents the style value for `grid-auto-rows` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-auto-rows).
166///
167/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
168///
169/// The grammar is defined as:
170///
171/// ```text,ignore
172/// <track-size>+
173/// ```
174///
175/// https://drafts.csswg.org/css-grid-3/#grid-auto-rows
176#[syntax(" <track-size>+ ")]
177#[derive(
178	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
179)]
180#[declaration_metadata(
181    initial = "auto",
182    applies_to = Grid,
183    animation_type = Discrete,
184    percentages = Unknown,
185    shorthand_group = Grid,
186    property_group = Grid,
187    computed_value_type = Unknown,
188    canonical_order = "per grammar",
189)]
190#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
191#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-auto-rows"))]
192#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
193#[derive(csskit_derives::NodeWithMetadata)]
194pub struct GridAutoRowsStyleValue<'a>;
195
196/// Represents the style value for `grid-column` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-column).
197///
198/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
199///
200/// The grammar is defined as:
201///
202/// ```text,ignore
203/// <grid-line> [ / <grid-line> ]?
204/// ```
205///
206/// https://drafts.csswg.org/css-grid-3/#grid-column
207#[syntax(" <grid-line> [ / <grid-line> ]? ")]
208#[derive(
209	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
210)]
211#[declaration_metadata(
212    initial = "auto",
213    applies_to = Unknown,
214    animation_type = Discrete,
215    longhands = GridColumnEnd|GridColumnStart,
216    property_group = Grid,
217    computed_value_type = Unknown,
218    canonical_order = "per grammar",
219)]
220#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
221#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-column"))]
222#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
223#[derive(csskit_derives::NodeWithMetadata)]
224pub struct GridColumnStyleValue<'a>;
225
226/// Represents the style value for `grid-column-end` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-column-end).
227///
228/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
229///
230/// The grammar is defined as:
231///
232/// ```text,ignore
233/// <grid-line>
234/// ```
235///
236/// https://drafts.csswg.org/css-grid-3/#grid-column-end
237#[syntax(" <grid-line> ")]
238#[derive(
239	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
240)]
241#[declaration_metadata(
242    initial = "auto",
243    applies_to = Unknown,
244    animation_type = Discrete,
245    shorthand_group = GridArea,
246    property_group = Grid,
247    computed_value_type = Unknown,
248    canonical_order = "per grammar",
249)]
250#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
251#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-column-end"))]
252#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
253#[derive(csskit_derives::NodeWithMetadata)]
254pub struct GridColumnEndStyleValue<'a>;
255
256/// Represents the style value for `grid-column-start` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-column-start).
257///
258/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
259///
260/// The grammar is defined as:
261///
262/// ```text,ignore
263/// <grid-line>
264/// ```
265///
266/// https://drafts.csswg.org/css-grid-3/#grid-column-start
267#[syntax(" <grid-line> ")]
268#[derive(
269	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
270)]
271#[declaration_metadata(
272    initial = "auto",
273    applies_to = Unknown,
274    animation_type = Discrete,
275    shorthand_group = GridArea,
276    property_group = Grid,
277    computed_value_type = Unknown,
278    canonical_order = "per grammar",
279)]
280#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
281#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-column-start"))]
282#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
283#[derive(csskit_derives::NodeWithMetadata)]
284pub struct GridColumnStartStyleValue<'a>;
285
286/// Represents the style value for `grid-row` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-row).
287///
288/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
289///
290/// The grammar is defined as:
291///
292/// ```text,ignore
293/// <grid-line> [ / <grid-line> ]?
294/// ```
295///
296/// https://drafts.csswg.org/css-grid-3/#grid-row
297#[syntax(" <grid-line> [ / <grid-line> ]? ")]
298#[derive(
299	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
300)]
301#[declaration_metadata(
302    initial = "auto",
303    applies_to = Unknown,
304    animation_type = Discrete,
305    longhands = GridRowEnd|GridRowStart,
306    property_group = Grid,
307    computed_value_type = Unknown,
308    canonical_order = "per grammar",
309)]
310#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
311#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-row"))]
312#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
313#[derive(csskit_derives::NodeWithMetadata)]
314pub struct GridRowStyleValue<'a>;
315
316/// Represents the style value for `grid-row-end` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-row-end).
317///
318/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
319///
320/// The grammar is defined as:
321///
322/// ```text,ignore
323/// <grid-line>
324/// ```
325///
326/// https://drafts.csswg.org/css-grid-3/#grid-row-end
327#[syntax(" <grid-line> ")]
328#[derive(
329	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
330)]
331#[declaration_metadata(
332    initial = "auto",
333    applies_to = Unknown,
334    animation_type = Discrete,
335    shorthand_group = GridRow,
336    property_group = Grid,
337    computed_value_type = Unknown,
338    canonical_order = "per grammar",
339)]
340#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
341#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-row-end"))]
342#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
343#[derive(csskit_derives::NodeWithMetadata)]
344pub struct GridRowEndStyleValue<'a>;
345
346/// Represents the style value for `grid-row-start` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-row-start).
347///
348/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
349///
350/// The grammar is defined as:
351///
352/// ```text,ignore
353/// <grid-line>
354/// ```
355///
356/// https://drafts.csswg.org/css-grid-3/#grid-row-start
357#[syntax(" <grid-line> ")]
358#[derive(
359	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
360)]
361#[declaration_metadata(
362    initial = "auto",
363    applies_to = Unknown,
364    animation_type = Discrete,
365    shorthand_group = GridRow,
366    property_group = Grid,
367    computed_value_type = Unknown,
368    canonical_order = "per grammar",
369)]
370#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
371#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-row-start"))]
372#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
373#[derive(csskit_derives::NodeWithMetadata)]
374pub struct GridRowStartStyleValue<'a>;
375
376/// Represents the style value for `grid-template` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-template).
377///
378/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
379///
380/// The grammar is defined as:
381///
382/// ```text,ignore
383/**none |
384[ <'grid-template-rows'> / <'grid-template-columns'> ] |
385[ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?*/
386/// ```
387///
388/// https://drafts.csswg.org/css-grid-3/#grid-template
389#[syntax(
390	" none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]? "
391)]
392#[derive(
393	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
394)]
395#[declaration_metadata(
396    initial = "none",
397    inherits = Unknown,
398    applies_to = Grid,
399    animation_type = Unknown,
400    percentages = Unknown,
401    longhands = GridTemplateAreas|GridTemplateColumns|GridTemplateRows,
402    property_group = Grid,
403    computed_value_type = Unknown,
404    canonical_order = "per grammar",
405)]
406#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
407#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-template"))]
408#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
409#[derive(csskit_derives::NodeWithMetadata)]
410pub enum GridTemplateStyleValue<'a> {}
411
412/// Represents the style value for `grid-template-areas` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-template-areas).
413///
414/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
415///
416/// The grammar is defined as:
417///
418/// ```text,ignore
419/// none | <string>+
420/// ```
421///
422/// https://drafts.csswg.org/css-grid-3/#grid-template-areas
423#[syntax(" none | <string>+ ")]
424#[derive(
425	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
426)]
427#[declaration_metadata(
428    initial = "none",
429    applies_to = Grid,
430    animation_type = Discrete,
431    shorthand_group = Grid,
432    property_group = Grid,
433    computed_value_type = Unknown,
434    canonical_order = "per grammar",
435)]
436#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
437#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-template-areas"))]
438#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
439#[derive(csskit_derives::NodeWithMetadata)]
440pub struct GridTemplateAreasStyleValue<'a>;
441
442/// Represents the style value for `grid-template-columns` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-template-columns).
443///
444/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
445///
446/// The grammar is defined as:
447///
448/// ```text,ignore
449/// none | <track-list> | <auto-track-list> | subgrid <line-name-list>?
450/// ```
451///
452/// https://drafts.csswg.org/css-grid-3/#grid-template-columns
453#[syntax(" none | <track-list> | <auto-track-list> | subgrid <line-name-list>? ")]
454#[derive(
455	Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
456)]
457#[declaration_metadata(
458    initial = "none",
459    applies_to = Grid,
460    animation_type = Discrete,
461    percentages = ContentArea,
462    shorthand_group = Grid,
463    property_group = Grid,
464    computed_value_type = Unknown,
465    canonical_order = "per grammar",
466)]
467#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
468#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-template-columns"))]
469#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
470#[derive(csskit_derives::NodeWithMetadata)]
471pub enum GridTemplateColumnsStyleValue<'a> {}
472
473/// Represents the style value for `grid-template-rows` as defined in [css-grid-3](https://drafts.csswg.org/css-grid-3/#grid-template-rows).
474///
475/// CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
476///
477/// The grammar is defined as:
478///
479/// ```text,ignore
480/// none | <track-list> | <auto-track-list> | subgrid <line-name-list>?
481/// ```
482///
483/// https://drafts.csswg.org/css-grid-3/#grid-template-rows
484#[syntax(" none | <track-list> | <auto-track-list> | subgrid <line-name-list>? ")]
485#[derive(
486	Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
487)]
488#[declaration_metadata(
489    initial = "none",
490    applies_to = Grid,
491    animation_type = Discrete,
492    percentages = ContentArea,
493    shorthand_group = Grid,
494    property_group = Grid,
495    computed_value_type = Unknown,
496    canonical_order = "per grammar",
497)]
498#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
499#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.grid-template-rows"))]
500#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
501#[derive(csskit_derives::NodeWithMetadata)]
502pub enum GridTemplateRowsStyleValue<'a> {}