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