css_ast/values/display/mod.rs
1#![allow(warnings)]
2//! https://drafts.csswg.org/css-display-4/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7// /// Represents the style value for `display` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#display).
8// ///
9// /// The display CSS property sets the display behavior of an element's box within its layout and sets the layout behavior for its child elements.
10// ///
11// /// The grammar is defined as:
12// ///
13// /// ```text,ignore
14// /// [ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>
15// /// ```
16// ///
17// /// https://drafts.csswg.org/css-display-4/#display
18// #[syntax(
19// " [ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy> "
20// )]
21// #[derive(
22// Parse,
23// Peek,
24// ToSpan,
25// ToCursors,
26// DeclarationMetadata,
27// SemanticEq,
28// Debug,
29// Clone,
30// PartialEq,
31// Eq,
32// PartialOrd,
33// Ord,
34// Hash,
35// )]
36// #[declaration_metadata(
37// initial = "inline",
38// applies_to = Elements,
39// animation_type = Unknown,
40// property_group = Display,
41// computed_value_type = Unknown,
42// canonical_order = "per grammar",
43// )]
44// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
45// #[cfg_attr(
46// feature = "css_feature_data",
47// derive(ToCSSFeature),
48// css_feature("css.properties.display")
49// )]
50// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
51// pub enum DisplayStyleValue {}
52
53/// Represents the style value for `order` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#order).
54///
55/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
56///
57/// The grammar is defined as:
58///
59/// ```text,ignore
60/// <integer>
61/// ```
62///
63/// https://drafts.csswg.org/css-display-4/#order
64#[syntax(" <integer> ")]
65#[derive(
66 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
67)]
68#[declaration_metadata(
69 initial = "0",
70 applies_to = Unknown,
71 animation_type = ByComputedValue,
72 property_group = Display,
73 computed_value_type = Unknown,
74 canonical_order = "per grammar",
75)]
76#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
77#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.order"))]
78#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
79pub struct OrderStyleValue;
80
81/// Represents the style value for `reading-flow` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#reading-flow).
82///
83/// The reading-flow CSS property sets the order in which flex or grid elements are rendered to speech or reached via focus navigation. The reading-order property overrides this order.
84///
85/// The grammar is defined as:
86///
87/// ```text,ignore
88/// normal | source-order | flex-visual | flex-flow | grid-rows | grid-columns | grid-order
89/// ```
90///
91/// https://drafts.csswg.org/css-display-4/#reading-flow
92#[syntax(" normal | source-order | flex-visual | flex-flow | grid-rows | grid-columns | grid-order ")]
93#[derive(
94 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
95)]
96#[declaration_metadata(
97 initial = "normal",
98 applies_to = Unknown,
99 property_group = Display,
100 computed_value_type = AsSpecified,
101 canonical_order = "per grammar",
102)]
103#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
104#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.reading-flow"))]
105#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
106pub enum ReadingFlowStyleValue {}
107
108/// Represents the style value for `reading-order` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#reading-order).
109///
110/// The reading-flow CSS property sets the order in which flex or grid elements are rendered to speech or reached via focus navigation. The reading-order property overrides this order.
111///
112/// The grammar is defined as:
113///
114/// ```text,ignore
115/// <integer>
116/// ```
117///
118/// https://drafts.csswg.org/css-display-4/#reading-order
119#[syntax(" <integer> ")]
120#[derive(
121 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
122)]
123#[declaration_metadata(
124 initial = "0",
125 applies_to = Unknown,
126 animation_type = ByComputedValue,
127 property_group = Display,
128 computed_value_type = Unknown,
129 canonical_order = "per grammar",
130)]
131#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
132#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.reading-order"))]
133#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
134pub struct ReadingOrderStyleValue;
135
136/// Represents the style value for `visibility` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#visibility).
137///
138/// The visibility CSS property sets whether an element is shown. Invisible elements still affect the document layout.
139///
140/// The grammar is defined as:
141///
142/// ```text,ignore
143/// visible | hidden | force-hidden | collapse
144/// ```
145///
146/// https://drafts.csswg.org/css-display-4/#visibility
147#[syntax(" visible | hidden | force-hidden | collapse ")]
148#[derive(
149 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
150)]
151#[declaration_metadata(
152 initial = "visible",
153 inherits,
154 applies_to = Elements,
155 animation_type = Discrete,
156 property_group = Display,
157 computed_value_type = AsSpecified,
158 canonical_order = "per grammar",
159)]
160#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
161#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.visibility"))]
162#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
163pub enum VisibilityStyleValue {}