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