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