css_ast/values/page_floats/
mod.rs

1#![allow(warnings)]
2//! https://drafts.csswg.org/css-page-floats-3/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7/// Represents the style value for `clear` as defined in [css-page-floats-3](https://drafts.csswg.org/css-page-floats-3/#clear).
8///
9/// The float CSS property aligns an element to either side of its container, allowing text and inline elements to flow around it. The clear CSS property sets whether an element is moved below floating elements that proceed it.
10///
11/// The grammar is defined as:
12///
13/// ```text,ignore
14/// inline-start | inline-end | block-start | block-end | left | right | top | bottom | both-inline | both-block | both | none
15/// ```
16///
17/// https://drafts.csswg.org/css-page-floats-3/#clear
18#[syntax(
19	" inline-start | inline-end | block-start | block-end | left | right | top | bottom | both-inline | both-block | both | none "
20)]
21#[derive(
22	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
23)]
24#[declaration_metadata(
25    initial = "none",
26    applies_to = Unknown,
27    animation_type = Discrete,
28    property_group = PageFloats,
29    computed_value_type = Unknown,
30    canonical_order = "per grammar",
31)]
32#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
33#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.clear"))]
34#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
35pub enum ClearStyleValue {}
36
37/// Represents the style value for `float` as defined in [css-page-floats-3](https://drafts.csswg.org/css-page-floats-3/#float).
38///
39/// The float CSS property aligns an element to either side of its container, allowing text and inline elements to flow around it. The clear CSS property sets whether an element is moved below floating elements that proceed it.
40///
41/// The grammar is defined as:
42///
43/// ```text,ignore
44/// block-start | block-end | inline-start | inline-end | snap-block | <snap-block()> | snap-inline | <snap-inline()> | left | right | top | bottom | none
45/// ```
46///
47/// https://drafts.csswg.org/css-page-floats-3/#float
48#[syntax(
49	" block-start | block-end | inline-start | inline-end | snap-block | <snap-block()> | snap-inline | <snap-inline()> | left | right | top | bottom | none "
50)]
51#[derive(
52	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
53)]
54#[declaration_metadata(
55    initial = "none",
56    applies_to = Elements,
57    animation_type = ByComputedValue,
58    property_group = PageFloats,
59    computed_value_type = AsSpecified,
60    canonical_order = "per grammar",
61)]
62#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
63#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.float"))]
64#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
65pub enum FloatStyleValue {}
66
67/// Represents the style value for `float-defer` as defined in [css-page-floats-3](https://drafts.csswg.org/css-page-floats-3/#float-defer).
68///
69/// The grammar is defined as:
70///
71/// ```text,ignore
72/// <integer> | last | none
73/// ```
74///
75/// https://drafts.csswg.org/css-page-floats-3/#float-defer
76#[syntax(" <integer> | last | none ")]
77#[derive(
78	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
79)]
80#[declaration_metadata(
81    initial = "none",
82    applies_to = Float,
83    animation_type = Discrete,
84    property_group = PageFloats,
85    computed_value_type = Unknown,
86    canonical_order = "per grammar",
87)]
88#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
89#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.float-defer"))]
90#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
91pub enum FloatDeferStyleValue {}
92
93/// Represents the style value for `float-offset` as defined in [css-page-floats-3](https://drafts.csswg.org/css-page-floats-3/#float-offset).
94///
95/// The grammar is defined as:
96///
97/// ```text,ignore
98/// <length-percentage>
99/// ```
100///
101/// https://drafts.csswg.org/css-page-floats-3/#float-offset
102#[syntax(" <length-percentage> ")]
103#[derive(
104	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
105)]
106#[declaration_metadata(
107    initial = "0",
108    applies_to = Float,
109    percentages = Unknown,
110    animation_type = ByComputedValue,
111    property_group = PageFloats,
112    computed_value_type = Unknown,
113    canonical_order = "per grammar",
114)]
115#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
116#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.float-offset"))]
117#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
118pub struct FloatOffsetStyleValue;
119
120/// Represents the style value for `float-reference` as defined in [css-page-floats-3](https://drafts.csswg.org/css-page-floats-3/#float-reference).
121///
122/// The grammar is defined as:
123///
124/// ```text,ignore
125/// inline | column | region | page
126/// ```
127///
128/// https://drafts.csswg.org/css-page-floats-3/#float-reference
129#[syntax(" inline | column | region | page ")]
130#[derive(
131	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
132)]
133#[declaration_metadata(
134    initial = "inline",
135    applies_to = Elements,
136    animation_type = Discrete,
137    property_group = PageFloats,
138    computed_value_type = Unknown,
139    canonical_order = "per grammar",
140)]
141#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
142#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.float-reference"))]
143#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
144pub enum FloatReferenceStyleValue {}