css_ast/values/rhythm/
mod.rs

1#![allow(warnings)]
2//! https://drafts.csswg.org/css-rhythm-1/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7/// Represents the style value for `block-step` as defined in [css-rhythm-1](https://drafts.csswg.org/css-rhythm-1/#block-step).
8///
9/// The grammar is defined as:
10///
11/// ```text,ignore
12/// <'block-step-size'> || <'block-step-insert'> || <'block-step-align'> || <'block-step-round'>
13/// ```
14///
15/// https://drafts.csswg.org/css-rhythm-1/#block-step
16#[syntax(" <'block-step-size'> || <'block-step-insert'> || <'block-step-align'> || <'block-step-round'> ")]
17#[derive(
18	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
19)]
20#[declaration_metadata(
21    initial = "see individual properties",
22    applies_to = Block,
23    animation_type = Unknown,
24    property_group = Rhythm,
25    computed_value_type = Unknown,
26    canonical_order = "per grammar",
27)]
28#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
29#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.block-step"))]
30#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
31pub struct BlockStepStyleValue;
32
33/// Represents the style value for `block-step-align` as defined in [css-rhythm-1](https://drafts.csswg.org/css-rhythm-1/#block-step-align).
34///
35/// The grammar is defined as:
36///
37/// ```text,ignore
38/// auto | center | start | end
39/// ```
40///
41/// https://drafts.csswg.org/css-rhythm-1/#block-step-align
42#[syntax(" auto | center | start | end ")]
43#[derive(
44	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
45)]
46#[declaration_metadata(
47    initial = "auto",
48    applies_to = Block,
49    animation_type = Discrete,
50    property_group = Rhythm,
51    computed_value_type = Unknown,
52    canonical_order = "per grammar",
53)]
54#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
55#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.block-step-align"))]
56#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
57pub enum BlockStepAlignStyleValue {}
58
59/// Represents the style value for `block-step-insert` as defined in [css-rhythm-1](https://drafts.csswg.org/css-rhythm-1/#block-step-insert).
60///
61/// The grammar is defined as:
62///
63/// ```text,ignore
64/// margin-box | padding-box | content-box
65/// ```
66///
67/// https://drafts.csswg.org/css-rhythm-1/#block-step-insert
68#[syntax(" margin-box | padding-box | content-box ")]
69#[derive(
70	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
71)]
72#[declaration_metadata(
73    initial = "margin-box",
74    applies_to = Block,
75    animation_type = Discrete,
76    property_group = Rhythm,
77    computed_value_type = Unknown,
78    canonical_order = "per grammar",
79)]
80#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
81#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.block-step-insert"))]
82#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
83pub enum BlockStepInsertStyleValue {}
84
85/// Represents the style value for `block-step-round` as defined in [css-rhythm-1](https://drafts.csswg.org/css-rhythm-1/#block-step-round).
86///
87/// The grammar is defined as:
88///
89/// ```text,ignore
90/// up | down | nearest
91/// ```
92///
93/// https://drafts.csswg.org/css-rhythm-1/#block-step-round
94#[syntax(" up | down | nearest ")]
95#[derive(
96	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
97)]
98#[declaration_metadata(
99    initial = "up",
100    applies_to = Block,
101    animation_type = Discrete,
102    property_group = Rhythm,
103    computed_value_type = Unknown,
104    canonical_order = "per grammar",
105)]
106#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
107#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.block-step-round"))]
108#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
109pub enum BlockStepRoundStyleValue {}
110
111/// Represents the style value for `block-step-size` as defined in [css-rhythm-1](https://drafts.csswg.org/css-rhythm-1/#block-step-size).
112///
113/// The grammar is defined as:
114///
115/// ```text,ignore
116/// none | <length [0,∞]>
117/// ```
118///
119/// https://drafts.csswg.org/css-rhythm-1/#block-step-size
120#[syntax(" none | <length [0,∞]> ")]
121#[derive(
122	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
123)]
124#[declaration_metadata(
125    initial = "none",
126    applies_to = Block,
127    animation_type = ByComputedValue,
128    property_group = Rhythm,
129    computed_value_type = SpecifiedKeywordPlusAbsoluteLength,
130    canonical_order = "per grammar",
131)]
132#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
133#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.block-step-size"))]
134#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
135pub struct BlockStepSizeStyleValue;
136
137/// Represents the style value for `line-height-step` as defined in [css-rhythm-1](https://drafts.csswg.org/css-rhythm-1/#line-height-step).
138///
139/// The grammar is defined as:
140///
141/// ```text,ignore
142/// <length [0,∞]>
143/// ```
144///
145/// https://drafts.csswg.org/css-rhythm-1/#line-height-step
146#[syntax(" <length [0,∞]> ")]
147#[derive(
148	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
149)]
150#[declaration_metadata(
151    initial = "0",
152    inherits,
153    applies_to = Block,
154    animation_type = ByComputedValue,
155    property_group = Rhythm,
156    computed_value_type = AbsoluteLength,
157    canonical_order = "per grammar",
158)]
159#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
160#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.line-height-step"))]
161#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
162pub struct LineHeightStepStyleValue;