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