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