css_ast/values/break/
mod.rs

1#![allow(warnings)]
2//! https://drafts.csswg.org/css-break-4/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7/// Represents the style value for `box-decoration-break` as defined in [css-break-4](https://drafts.csswg.org/css-break-4/#box-decoration-break).
8///
9/// The box-decoration-break CSS property sets whether box decorations, such as borders or backgrounds, of an element divided across a page, column, or region wraps each fragment or splits across the break.
10///
11/// The grammar is defined as:
12///
13/// ```text,ignore
14/// slice | clone
15/// ```
16///
17/// https://drafts.csswg.org/css-break-4/#box-decoration-break
18#[syntax(" slice | clone ")]
19#[derive(
20	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
21)]
22#[declaration_metadata(
23    initial = "slice",
24    applies_to = Elements,
25    animation_type = Discrete,
26    property_group = Break,
27    computed_value_type = Unknown,
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.box-decoration-break"))]
32#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
33pub enum BoxDecorationBreakStyleValue {}
34
35/// Represents the style value for `break-after` as defined in [css-break-4](https://drafts.csswg.org/css-break-4/#break-after).
36///
37/// In printed page layouts, the break-after, break-before, break-inside CSS properties control where printed pages start and end. Also known as pagination or page breaking.
38///
39/// The grammar is defined as:
40///
41/// ```text,ignore
42/// auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region
43/// ```
44///
45/// https://drafts.csswg.org/css-break-4/#break-after
46#[syntax(
47	" auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region "
48)]
49#[derive(
50	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
51)]
52#[declaration_metadata(
53    initial = "auto",
54    applies_to = Unknown,
55    animation_type = Discrete,
56    property_group = Break,
57    computed_value_type = Unknown,
58    canonical_order = "per grammar",
59)]
60#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
61#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.break-after"))]
62#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
63pub enum BreakAfterStyleValue {}
64
65/// Represents the style value for `break-before` as defined in [css-break-4](https://drafts.csswg.org/css-break-4/#break-before).
66///
67/// In printed page layouts, the break-after, break-before, break-inside CSS properties control where printed pages start and end. Also known as pagination or page breaking.
68///
69/// The grammar is defined as:
70///
71/// ```text,ignore
72/// auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region
73/// ```
74///
75/// https://drafts.csswg.org/css-break-4/#break-before
76#[syntax(
77	" auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region "
78)]
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 = Discrete,
86    property_group = Break,
87    computed_value_type = Unknown,
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.break-before"))]
92#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
93pub enum BreakBeforeStyleValue {}
94
95/// Represents the style value for `break-inside` as defined in [css-break-4](https://drafts.csswg.org/css-break-4/#break-inside).
96///
97/// In printed page layouts, the break-after, break-before, break-inside CSS properties control where printed pages start and end. Also known as pagination or page breaking.
98///
99/// The grammar is defined as:
100///
101/// ```text,ignore
102/// auto | avoid | avoid-page | avoid-column | avoid-region
103/// ```
104///
105/// https://drafts.csswg.org/css-break-4/#break-inside
106#[syntax(" auto | avoid | avoid-page | avoid-column | avoid-region ")]
107#[derive(
108	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
109)]
110#[declaration_metadata(
111    initial = "auto",
112    applies_to = Unknown,
113    animation_type = Discrete,
114    property_group = Break,
115    computed_value_type = Unknown,
116    canonical_order = "per grammar",
117)]
118#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
119#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.break-inside"))]
120#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
121pub enum BreakInsideStyleValue {}
122
123/// Represents the style value for `margin-break` as defined in [css-break-4](https://drafts.csswg.org/css-break-4/#margin-break).
124///
125/// The grammar is defined as:
126///
127/// ```text,ignore
128/// auto | keep | discard
129/// ```
130///
131/// https://drafts.csswg.org/css-break-4/#margin-break
132#[syntax(" auto | keep | discard ")]
133#[derive(
134	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
135)]
136#[declaration_metadata(
137    initial = "auto",
138    applies_to = Elements,
139    animation_type = Discrete,
140    property_group = Break,
141    computed_value_type = Unknown,
142    canonical_order = "per grammar",
143    box_portion = Margin,
144)]
145#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
146#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-break"))]
147#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
148pub enum MarginBreakStyleValue {}
149
150/// Represents the style value for `orphans` as defined in [css-break-4](https://drafts.csswg.org/css-break-4/#orphans).
151///
152/// The widows and orphans CSS properties set the minimum lines included in a text fragment created by page, column, or region breaks.
153///
154/// The grammar is defined as:
155///
156/// ```text,ignore
157/// <integer [1,∞]>
158/// ```
159///
160/// https://drafts.csswg.org/css-break-4/#orphans
161#[syntax(" <integer [1,∞]> ")]
162#[derive(
163	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
164)]
165#[declaration_metadata(
166    initial = "2",
167    inherits,
168    applies_to = Unknown,
169    animation_type = ByComputedValue,
170    property_group = Break,
171    computed_value_type = Unknown,
172    canonical_order = "per grammar",
173)]
174#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
175#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.orphans"))]
176#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
177pub struct OrphansStyleValue;
178
179/// Represents the style value for `widows` as defined in [css-break-4](https://drafts.csswg.org/css-break-4/#widows).
180///
181/// The widows and orphans CSS properties set the minimum lines included in a text fragment created by page, column, or region breaks.
182///
183/// The grammar is defined as:
184///
185/// ```text,ignore
186/// <integer [1,∞]>
187/// ```
188///
189/// https://drafts.csswg.org/css-break-4/#widows
190#[syntax(" <integer [1,∞]> ")]
191#[derive(
192	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
193)]
194#[declaration_metadata(
195    initial = "2",
196    inherits,
197    applies_to = Unknown,
198    animation_type = ByComputedValue,
199    property_group = Break,
200    computed_value_type = Unknown,
201    canonical_order = "per grammar",
202)]
203#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
204#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.widows"))]
205#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
206pub struct WidowsStyleValue;