css_ast/values/multicol/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/7e27ad7484307dfdbe9d0e18ad19d02859389688
3// Do not edit this file directly.
4#![allow(warnings)]
5//! https://drafts.csswg.org/css-multicol-2/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `column-count` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#column-count).
11///
12/// 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.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// auto | <integer [1,∞]>
18/// ```
19///
20/// https://drafts.csswg.org/css-multicol-2/#column-count
21#[syntax(" auto | <integer [1,∞]> ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "auto",
27    applies_to = Unknown,
28    animation_type = ByComputedValue,
29    shorthand_group = Columns,
30    property_group = Multicol,
31    computed_value_type = AsSpecified,
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.column-count"))]
36#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
37#[derive(csskit_derives::NodeWithMetadata)]
38pub struct ColumnCountStyleValue;
39
40/// Represents the style value for `column-fill` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#column-fill).
41///
42/// The column-fill CSS property sets the distribution of content across columns in a multi-column layout.
43///
44/// The grammar is defined as:
45///
46/// ```text,ignore
47/// auto | balance | balance-all
48/// ```
49///
50/// https://drafts.csswg.org/css-multicol-2/#column-fill
51#[syntax(" auto | balance | balance-all ")]
52#[derive(
53	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
54)]
55#[declaration_metadata(
56    initial = "balance",
57    applies_to = Unknown,
58    animation_type = Discrete,
59    property_group = Multicol,
60    computed_value_type = Unknown,
61    canonical_order = "per grammar",
62)]
63#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
64#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-fill"))]
65#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
66#[derive(csskit_derives::NodeWithMetadata)]
67pub enum ColumnFillStyleValue {}
68
69/// Represents the style value for `column-height` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#column-height).
70///
71/// The grammar is defined as:
72///
73/// ```text,ignore
74/// auto | <length [0,∞]>
75/// ```
76///
77/// https://drafts.csswg.org/css-multicol-2/#column-height
78#[syntax(" auto | <length [0,∞]> ")]
79#[derive(
80	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
81)]
82#[declaration_metadata(
83    initial = "auto",
84    applies_to = Unknown,
85    animation_type = ByComputedValue,
86    property_group = Multicol,
87    computed_value_type = SpecifiedKeywordPlusAbsoluteLength,
88    canonical_order = "per grammar",
89)]
90#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
91#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-height"))]
92#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
93#[derive(csskit_derives::NodeWithMetadata)]
94pub struct ColumnHeightStyleValue;
95
96/// Represents the style value for `column-span` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#column-span).
97///
98/// The column-span CSS property controls whether a child element extends across all columns of a multi-column parent.
99///
100/// The grammar is defined as:
101///
102/// ```text,ignore
103/// none | <integer [1,∞]> | all | auto
104/// ```
105///
106/// https://drafts.csswg.org/css-multicol-2/#column-span
107#[syntax(" none | <integer [1,∞]> | all | auto ")]
108#[derive(
109	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
110)]
111#[declaration_metadata(
112    initial = "none",
113    applies_to = Unknown,
114    animation_type = Discrete,
115    property_group = Multicol,
116    computed_value_type = AsSpecified,
117    canonical_order = "per grammar",
118)]
119#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
120#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-span"))]
121#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
122#[derive(csskit_derives::NodeWithMetadata)]
123pub enum ColumnSpanStyleValue {}
124
125/// Represents the style value for `column-width` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#column-width).
126///
127/// 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.
128///
129/// The grammar is defined as:
130///
131/// ```text,ignore
132/// auto | <length [0,∞]>
133/// ```
134///
135/// https://drafts.csswg.org/css-multicol-2/#column-width
136#[syntax(" auto | <length [0,∞]> ")]
137#[derive(
138	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
139)]
140#[declaration_metadata(
141    initial = "auto",
142    applies_to = Unknown,
143    animation_type = ByComputedValue,
144    shorthand_group = Columns,
145    property_group = Multicol,
146    computed_value_type = SpecifiedKeywordPlusAbsoluteLength,
147    canonical_order = "per grammar",
148)]
149#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
150#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-width"))]
151#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
152#[derive(csskit_derives::NodeWithMetadata)]
153pub struct ColumnWidthStyleValue;
154
155/// Represents the style value for `column-wrap` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#column-wrap).
156///
157/// The grammar is defined as:
158///
159/// ```text,ignore
160/// auto | nowrap | wrap
161/// ```
162///
163/// https://drafts.csswg.org/css-multicol-2/#column-wrap
164#[syntax(" auto | nowrap | wrap ")]
165#[derive(
166	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
167)]
168#[declaration_metadata(
169    initial = "auto",
170    applies_to = Unknown,
171    animation_type = Discrete,
172    property_group = Multicol,
173    computed_value_type = Unknown,
174    canonical_order = "per grammar",
175)]
176#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
177#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-wrap"))]
178#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
179#[derive(csskit_derives::NodeWithMetadata)]
180pub enum ColumnWrapStyleValue {}
181
182// /// Represents the style value for `columns` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#columns).
183// ///
184// /// 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.
185// ///
186// /// The grammar is defined as:
187// ///
188// /// ```text,ignore
189// /// [ <'column-width'> || <'column-count'> ] [ / <'column-height'> ]?
190// /// ```
191// ///
192// /// https://drafts.csswg.org/css-multicol-2/#columns
193// #[syntax(" [ <'column-width'> || <'column-count'> ] [ / <'column-height'> ]? ")]
194// #[derive(
195//     Parse,
196//     Peek,
197//     ToSpan,
198//     ToCursors,
199//     DeclarationMetadata,
200//     SemanticEq,
201//     Debug,
202//     Clone,
203//     PartialEq,
204//     Eq,
205//     PartialOrd,
206//     Ord,
207//     Hash,
208// )]
209// #[declaration_metadata(
210//     initial = "see individual properties",
211//     inherits = Unknown,
212//     applies_to = Unknown,
213//     animation_type = Unknown,
214//     percentages = Unknown,
215//     longhands = ColumnCount|ColumnWidth,
216//     property_group = Multicol,
217//     computed_value_type = Unknown,
218//     canonical_order = "per grammar",
219// )]
220// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
221// #[cfg_attr(
222//     feature = "css_feature_data",
223//     derive(ToCSSFeature),
224//     css_feature("css.properties.columns")
225// )]
226// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
227// #[derive(csskit_derives::NodeWithMetadata)]
228// pub struct ColumnsStyleValue;