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