Skip to main content

css_ast/values/multicol/
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-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    shorthands = 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<'a>;
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<'a> {}
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    shorthands = Columns,
87    property_group = Multicol,
88    computed_value_type = SpecifiedKeywordPlusAbsoluteLength,
89    canonical_order = "per grammar",
90)]
91#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
92#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-height"))]
93#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
94#[derive(csskit_derives::NodeWithMetadata)]
95pub struct ColumnHeightStyleValue<'a>;
96
97/// Represents the style value for `column-span` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#column-span).
98///
99/// The column-span CSS property controls whether a child element extends across all columns of a multi-column parent.
100///
101/// The grammar is defined as:
102///
103/// ```text,ignore
104/// none | <integer [1,∞]> | all | auto
105/// ```
106///
107/// https://drafts.csswg.org/css-multicol-2/#column-span
108#[syntax(" none | <integer [1,∞]> | all | auto ")]
109#[derive(
110	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
111)]
112#[declaration_metadata(
113    initial = "none",
114    applies_to = Unknown,
115    animation_type = Discrete,
116    property_group = Multicol,
117    computed_value_type = AsSpecified,
118    canonical_order = "per grammar",
119)]
120#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
121#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-span"))]
122#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
123#[derive(csskit_derives::NodeWithMetadata)]
124pub enum ColumnSpanStyleValue<'a> {}
125
126/// Represents the style value for `column-width` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#column-width).
127///
128/// 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.
129///
130/// The grammar is defined as:
131///
132/// ```text,ignore
133/// auto | <length [0,∞]>
134/// ```
135///
136/// https://drafts.csswg.org/css-multicol-2/#column-width
137#[syntax(" auto | <length [0,∞]> ")]
138#[derive(
139	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
140)]
141#[declaration_metadata(
142    initial = "auto",
143    applies_to = Unknown,
144    animation_type = ByComputedValue,
145    shorthands = Columns,
146    property_group = Multicol,
147    computed_value_type = SpecifiedKeywordPlusAbsoluteLength,
148    canonical_order = "per grammar",
149)]
150#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
151#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-width"))]
152#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
153#[derive(csskit_derives::NodeWithMetadata)]
154pub struct ColumnWidthStyleValue<'a>;
155
156/// Represents the style value for `column-wrap` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#column-wrap).
157///
158/// The grammar is defined as:
159///
160/// ```text,ignore
161/// auto | nowrap | wrap
162/// ```
163///
164/// https://drafts.csswg.org/css-multicol-2/#column-wrap
165#[syntax(" auto | nowrap | wrap ")]
166#[derive(
167	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
168)]
169#[declaration_metadata(
170    initial = "auto",
171    applies_to = Unknown,
172    animation_type = Discrete,
173    property_group = Multicol,
174    computed_value_type = Unknown,
175    canonical_order = "per grammar",
176)]
177#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
178#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.column-wrap"))]
179#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
180#[derive(csskit_derives::NodeWithMetadata)]
181pub enum ColumnWrapStyleValue<'a> {}
182
183/// Represents the style value for `columns` as defined in [css-multicol-2](https://drafts.csswg.org/css-multicol-2/#columns).
184///
185/// 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.
186///
187/// The grammar is defined as:
188///
189/// ```text,ignore
190/// [ <'column-width'> || <'column-count'> ] [ / <'column-height'> ]?
191/// ```
192///
193/// https://drafts.csswg.org/css-multicol-2/#columns
194#[syntax(" [ <'column-width'> || <'column-count'> ] [ / <'column-height'> ]? ")]
195#[derive(
196	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
197)]
198#[declaration_metadata(
199    initial = "see individual properties",
200    inherits = Unknown,
201    applies_to = Unknown,
202    animation_type = Unknown,
203    percentages = Unknown,
204    longhands = ColumnWidth|ColumnCount|ColumnHeight,
205    property_group = Multicol,
206    computed_value_type = Unknown,
207    canonical_order = "per grammar",
208)]
209#[declaration_writes(ColumnWidth?, ColumnCount?, "/" ColumnHeight?)]
210#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
211#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.columns"))]
212#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
213#[derive(csskit_derives::NodeWithMetadata)]
214pub struct ColumnsStyleValue<'a>;