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