css_ast/values/writing_modes/
mod.rs

1#![allow(warnings)]
2//! https://drafts.csswg.org/css-writing-modes-4/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7/// Represents the style value for `direction` as defined in [css-writing-modes-4](https://drafts.csswg.org/css-writing-modes-4/#direction).
8///
9/// The unicode-bidi and direction CSS properties override the Unicode layout algorithm. They are intended for Document Type Definition (DTD) designers. For HTML documents, you should use the dir global HTML attribute and <bdo> HTML element instead.
10///
11/// The grammar is defined as:
12///
13/// ```text,ignore
14/// ltr | rtl
15/// ```
16///
17/// https://drafts.csswg.org/css-writing-modes-4/#direction
18#[syntax(" ltr | rtl ")]
19#[derive(
20	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
21)]
22#[declaration_metadata(
23    initial = "ltr",
24    inherits,
25    applies_to = Elements,
26    property_group = WritingModes,
27    computed_value_type = AsSpecified,
28    canonical_order = "n/a",
29)]
30#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
31#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.direction"))]
32#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
33pub enum DirectionStyleValue {}
34
35/// Represents the style value for `glyph-orientation-vertical` as defined in [css-writing-modes-4](https://drafts.csswg.org/css-writing-modes-4/#glyph-orientation-vertical).
36///
37/// The glyph-orientation-vertical CSS property sets the orientation of glyphs in text rendered in a vertical writing mode.
38///
39/// The grammar is defined as:
40///
41/// ```text,ignore
42/// auto | 0deg | 90deg | 0 | 90
43/// ```
44///
45/// https://drafts.csswg.org/css-writing-modes-4/#glyph-orientation-vertical
46#[syntax(" auto | 0deg | 90deg | 0 | 90 ")]
47#[derive(
48	Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
49)]
50#[declaration_metadata(
51    initial = "n/a",
52    inherits = Unknown,
53    property_group = WritingModes,
54    computed_value_type = Unknown,
55    canonical_order = "n/a",
56)]
57#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
58#[cfg_attr(
59	feature = "css_feature_data",
60	derive(ToCSSFeature),
61	css_feature("css.properties.glyph-orientation-vertical")
62)]
63#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
64pub enum GlyphOrientationVerticalStyleValue {}
65
66/// Represents the style value for `text-combine-upright` as defined in [css-writing-modes-4](https://drafts.csswg.org/css-writing-modes-4/#text-combine-upright).
67///
68/// The text-combine-upright CSS property displays multiple characters in the space of a single character in vertical text. This is used in East Asian documents to display Latin-based strings such as components of a date or letters of an initialism.
69///
70/// The grammar is defined as:
71///
72/// ```text,ignore
73/// none | all | [ digits <integer [2,4]>? ]
74/// ```
75///
76/// https://drafts.csswg.org/css-writing-modes-4/#text-combine-upright
77#[syntax(" none | all | [ digits <integer [2,4]>? ] ")]
78#[derive(
79	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
80)]
81#[declaration_metadata(
82    initial = "none",
83    inherits,
84    applies_to = Unknown,
85    property_group = WritingModes,
86    computed_value_type = Unknown,
87    canonical_order = "n/a",
88)]
89#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
90#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-combine-upright"))]
91#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
92pub enum TextCombineUprightStyleValue {}
93
94/// Represents the style value for `text-orientation` as defined in [css-writing-modes-4](https://drafts.csswg.org/css-writing-modes-4/#text-orientation).
95///
96/// The text-orientation CSS property sets the how text is typeset within a line when the writing mode is vertical.
97///
98/// The grammar is defined as:
99///
100/// ```text,ignore
101/// mixed | upright | sideways
102/// ```
103///
104/// https://drafts.csswg.org/css-writing-modes-4/#text-orientation
105#[syntax(" mixed | upright | sideways ")]
106#[derive(
107	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
108)]
109#[declaration_metadata(
110    initial = "mixed",
111    inherits,
112    applies_to = Unknown,
113    property_group = WritingModes,
114    computed_value_type = AsSpecified,
115    canonical_order = "n/a",
116)]
117#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
118#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-orientation"))]
119#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
120pub enum TextOrientationStyleValue {}
121
122/// Represents the style value for `unicode-bidi` as defined in [css-writing-modes-4](https://drafts.csswg.org/css-writing-modes-4/#unicode-bidi).
123///
124/// The unicode-bidi and direction CSS properties override the Unicode layout algorithm. They are intended for Document Type Definition (DTD) designers. For HTML documents, you should use the dir global HTML attribute and <bdo> HTML element instead.
125///
126/// The grammar is defined as:
127///
128/// ```text,ignore
129/// normal | embed | isolate | bidi-override | isolate-override | plaintext
130/// ```
131///
132/// https://drafts.csswg.org/css-writing-modes-4/#unicode-bidi
133#[syntax(" normal | embed | isolate | bidi-override | isolate-override | plaintext ")]
134#[derive(
135	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
136)]
137#[declaration_metadata(
138    initial = "normal",
139    applies_to = Elements,
140    property_group = WritingModes,
141    computed_value_type = AsSpecified,
142    canonical_order = "per grammar",
143)]
144#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
145#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.unicode-bidi"))]
146#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
147pub enum UnicodeBidiStyleValue {}
148
149/// Represents the style value for `writing-mode` as defined in [css-writing-modes-4](https://drafts.csswg.org/css-writing-modes-4/#writing-mode).
150///
151/// The writing-mode CSS property sets whether text is laid out horizontally or vertically, and left to right, or right to left.
152///
153/// The grammar is defined as:
154///
155/// ```text,ignore
156/// horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr
157/// ```
158///
159/// https://drafts.csswg.org/css-writing-modes-4/#writing-mode
160#[syntax(" horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr ")]
161#[derive(
162	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
163)]
164#[declaration_metadata(
165    initial = "horizontal-tb",
166    inherits,
167    applies_to = Unknown,
168    property_group = WritingModes,
169    computed_value_type = AsSpecified,
170    canonical_order = "n/a",
171)]
172#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
173#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.writing-mode"))]
174#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
175pub enum WritingModeStyleValue {}