css_ast/values/multicol/
mod.rs

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