css_ast/values/inline/
mod.rs

1#![allow(warnings)]
2//! https://drafts.csswg.org/css-inline-3/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7/// Represents the style value for `alignment-baseline` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#alignment-baseline).
8///
9/// The alignment-baseline CSS property sets which baseline of an element is aligned with the corresponding baseline of its parent.
10///
11/// The grammar is defined as:
12///
13/// ```text,ignore
14/// baseline | text-bottom | alphabetic | ideographic | middle | central | mathematical | text-top
15/// ```
16///
17/// https://drafts.csswg.org/css-inline-3/#alignment-baseline
18#[syntax(" baseline | text-bottom | alphabetic | ideographic | middle | central | mathematical | text-top ")]
19#[derive(
20	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
21)]
22#[declaration_metadata(
23    initial = "baseline",
24    applies_to = Unknown,
25    animation_type = Discrete,
26    property_group = Inline,
27    computed_value_type = Unknown,
28    canonical_order = "per grammar",
29)]
30#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
31#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.alignment-baseline"))]
32#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
33pub enum AlignmentBaselineStyleValue {}
34
35/// Represents the style value for `baseline-shift` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#baseline-shift).
36///
37/// The baseline-shift CSS property sets the position of an element relative to its dominant baseline.
38///
39/// The grammar is defined as:
40///
41/// ```text,ignore
42/// <length-percentage> | sub | super | top | center | bottom
43/// ```
44///
45/// https://drafts.csswg.org/css-inline-3/#baseline-shift
46#[syntax(" <length-percentage> | sub | super | top | center | bottom ")]
47#[derive(
48	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
49)]
50#[declaration_metadata(
51    initial = "0",
52    applies_to = Unknown,
53    percentages = LineBox,
54    animation_type = ByComputedValue,
55    property_group = Inline,
56    computed_value_type = Unknown,
57    canonical_order = "per grammar",
58)]
59#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
60#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.baseline-shift"))]
61#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
62pub enum BaselineShiftStyleValue {}
63
64/// Represents the style value for `baseline-source` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#baseline-source).
65///
66/// The baseline-source CSS property controls how inline-level boxes with multiple lines of text are aligned with the surrounding text. By default, which typographic baseline is used depends on the display property value.
67///
68/// The grammar is defined as:
69///
70/// ```text,ignore
71/// auto | first | last
72/// ```
73///
74/// https://drafts.csswg.org/css-inline-3/#baseline-source
75#[syntax(" auto | first | last ")]
76#[derive(
77	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
78)]
79#[declaration_metadata(
80    initial = "auto",
81    applies_to = Unknown,
82    animation_type = Discrete,
83    property_group = Inline,
84    computed_value_type = Unknown,
85    canonical_order = "per grammar",
86)]
87#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
88#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.baseline-source"))]
89#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
90pub enum BaselineSourceStyleValue {}
91
92/// Represents the style value for `dominant-baseline` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#dominant-baseline).
93///
94/// The dominant-baseline CSS property sets the specific baseline used to align an elements's text and inline-level contents.
95///
96/// The grammar is defined as:
97///
98/// ```text,ignore
99/// auto | text-bottom | alphabetic | ideographic | middle | central | mathematical | hanging | text-top
100/// ```
101///
102/// https://drafts.csswg.org/css-inline-3/#dominant-baseline
103#[syntax(" auto | text-bottom | alphabetic | ideographic | middle | central | mathematical | hanging | text-top ")]
104#[derive(
105	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
106)]
107#[declaration_metadata(
108    initial = "auto",
109    inherits,
110    applies_to = Unknown,
111    animation_type = Discrete,
112    property_group = Inline,
113    computed_value_type = Unknown,
114    canonical_order = "per grammar",
115)]
116#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
117#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.dominant-baseline"))]
118#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
119pub enum DominantBaselineStyleValue {}
120
121// /// Represents the style value for `initial-letter` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#initial-letter).
122// ///
123// /// The initial-letter CSS property sets the number of lines the first letter of an element occupies. You can use the property to make a raised capital or drop cap.
124// ///
125// /// The grammar is defined as:
126// ///
127// /// ```text,ignore
128// /// normal | <number [1,∞]> <integer [1,∞]> | <number [1,∞]> && [ drop | raise ]?
129// /// ```
130// ///
131// /// https://drafts.csswg.org/css-inline-3/#initial-letter
132// #[syntax(
133//     " normal | <number [1,∞]> <integer [1,∞]> | <number [1,∞]> && [ drop | raise ]? "
134// )]
135// #[derive(
136//     Parse,
137//     Peek,
138//     ToSpan,
139//     ToCursors,
140//     DeclarationMetadata,
141//     SemanticEq,
142//     Debug,
143//     Clone,
144//     PartialEq,
145//     Eq,
146//     PartialOrd,
147//     Ord,
148//     Hash,
149// )]
150// #[declaration_metadata(
151//     initial = "normal",
152//     applies_to = Unknown,
153//     animation_type = ByComputedValue,
154//     property_group = Inline,
155//     computed_value_type = Unknown,
156//     canonical_order = "per grammar",
157// )]
158// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
159// #[cfg_attr(
160//     feature = "css_feature_data",
161//     derive(ToCSSFeature),
162//     css_feature("css.properties.initial-letter")
163// )]
164// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
165// pub enum InitialLetterStyleValue {}
166
167// /// Represents the style value for `initial-letter-align` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#initial-letter-align).
168// ///
169// /// The grammar is defined as:
170// ///
171// /// ```text,ignore
172// /// [ border-box? [ alphabetic | ideographic | hanging | leading ]? ]!
173// /// ```
174// ///
175// /// https://drafts.csswg.org/css-inline-3/#initial-letter-align
176// #[syntax(" [ border-box? [ alphabetic | ideographic | hanging | leading ]? ]! ")]
177// #[derive(
178//     Parse,
179//     Peek,
180//     ToSpan,
181//     ToCursors,
182//     DeclarationMetadata,
183//     SemanticEq,
184//     Debug,
185//     Clone,
186//     PartialEq,
187//     Eq,
188//     PartialOrd,
189//     Ord,
190//     Hash,
191// )]
192// #[declaration_metadata(
193//     initial = "alphabetic",
194//     inherits,
195//     applies_to = Unknown,
196//     animation_type = Discrete,
197//     property_group = Inline,
198//     computed_value_type = Unknown,
199//     canonical_order = "per grammar",
200// )]
201// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
202// #[cfg_attr(
203//     feature = "css_feature_data",
204//     derive(ToCSSFeature),
205//     css_feature("css.properties.initial-letter-align")
206// )]
207// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
208// pub struct InitialLetterAlignStyleValue;
209
210/// Represents the style value for `initial-letter-wrap` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#initial-letter-wrap).
211///
212/// The grammar is defined as:
213///
214/// ```text,ignore
215/// none | first | all | grid | <length-percentage>
216/// ```
217///
218/// https://drafts.csswg.org/css-inline-3/#initial-letter-wrap
219#[syntax(" none | first | all | grid | <length-percentage> ")]
220#[derive(
221	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
222)]
223#[declaration_metadata(
224    initial = "none",
225    inherits,
226    applies_to = Unknown,
227    percentages = Unknown,
228    animation_type = ByComputedValue,
229    property_group = Inline,
230    computed_value_type = Unknown,
231    canonical_order = "per grammar",
232)]
233#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
234#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.initial-letter-wrap"))]
235#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
236pub enum InitialLetterWrapStyleValue {}
237
238/// Represents the style value for `inline-sizing` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#inline-sizing).
239///
240/// The grammar is defined as:
241///
242/// ```text,ignore
243/// normal | stretch
244/// ```
245///
246/// https://drafts.csswg.org/css-inline-3/#inline-sizing
247#[syntax(" normal | stretch ")]
248#[derive(
249	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
250)]
251#[declaration_metadata(
252    initial = "normal",
253    inherits,
254    applies_to = Unknown,
255    animation_type = Discrete,
256    property_group = Inline,
257    computed_value_type = Unknown,
258    canonical_order = "per grammar",
259)]
260#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
261#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inline-sizing"))]
262#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
263pub enum InlineSizingStyleValue {}
264
265/// Represents the style value for `line-fit-edge` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#line-fit-edge).
266///
267/// The grammar is defined as:
268///
269/// ```text,ignore
270/// leading | <text-edge>
271/// ```
272///
273/// https://drafts.csswg.org/css-inline-3/#line-fit-edge
274#[syntax(" leading | <text-edge> ")]
275#[derive(
276	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
277)]
278#[declaration_metadata(
279    initial = "leading",
280    inherits,
281    applies_to = Unknown,
282    animation_type = Discrete,
283    property_group = Inline,
284    computed_value_type = Unknown,
285    canonical_order = "per grammar",
286)]
287#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
288#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.line-fit-edge"))]
289#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
290pub enum LineFitEdgeStyleValue {}
291
292/// Represents the style value for `line-height` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#line-height).
293///
294/// The line-height CSS property sets the spacing between text baselines, oriented to the horizontal or vertical writing mode.
295///
296/// The grammar is defined as:
297///
298/// ```text,ignore
299/// normal | <number [0,∞]> | <length-percentage [0,∞]>
300/// ```
301///
302/// https://drafts.csswg.org/css-inline-3/#line-height
303#[syntax(" normal | <number [0,∞]> | <length-percentage [0,∞]> ")]
304#[derive(
305	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
306)]
307#[declaration_metadata(
308    initial = "normal",
309    inherits,
310    applies_to = Unknown,
311    percentages = FontSize,
312    animation_type = ByComputedValue,
313    property_group = Inline,
314    computed_value_type = Unknown,
315    canonical_order = "per grammar",
316)]
317#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
318#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.line-height"))]
319#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
320pub enum LineHeightStyleValue {}
321
322// /// Represents the style value for `text-box` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box).
323// ///
324// /// The text-box CSS property sets the spacing above and below text based on a font's typographic features. For example, text-box: trim-both ex alphabetic trims the top to the top of the letter x and the bottom to the bottom of most letters, without descenders.
325// ///
326// /// The grammar is defined as:
327// ///
328// /// ```text,ignore
329// /// normal | <'text-box-trim'> || <'text-box-edge'>
330// /// ```
331// ///
332// /// https://drafts.csswg.org/css-inline-3/#text-box
333// #[syntax(" normal | <'text-box-trim'> || <'text-box-edge'> ")]
334// #[derive(
335//     Parse,
336//     Peek,
337//     ToSpan,
338//     ToCursors,
339//     DeclarationMetadata,
340//     SemanticEq,
341//     Debug,
342//     Clone,
343//     PartialEq,
344//     Eq,
345//     PartialOrd,
346//     Ord,
347//     Hash,
348// )]
349// #[declaration_metadata(
350//     initial = "normal",
351//     applies_to = Unknown,
352//     animation_type = Discrete,
353//     property_group = Inline,
354//     computed_value_type = Unknown,
355//     canonical_order = "per grammar",
356// )]
357// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
358// #[cfg_attr(
359//     feature = "css_feature_data",
360//     derive(ToCSSFeature),
361//     css_feature("css.properties.text-box")
362// )]
363// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
364// pub enum TextBoxStyleValue {}
365
366/// Represents the style value for `text-box-edge` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box-edge).
367///
368/// The text-box CSS property sets the spacing above and below text based on a font's typographic features. For example, text-box: trim-both ex alphabetic trims the top to the top of the letter x and the bottom to the bottom of most letters, without descenders.
369///
370/// The grammar is defined as:
371///
372/// ```text,ignore
373/// auto | <text-edge>
374/// ```
375///
376/// https://drafts.csswg.org/css-inline-3/#text-box-edge
377#[syntax(" auto | <text-edge> ")]
378#[derive(
379	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
380)]
381#[declaration_metadata(
382    initial = "auto",
383    inherits,
384    applies_to = Unknown,
385    animation_type = Discrete,
386    property_group = Inline,
387    computed_value_type = Unknown,
388    canonical_order = "per grammar",
389)]
390#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
391#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box-edge"))]
392#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
393pub struct TextBoxEdgeStyleValue;
394
395/// Represents the style value for `text-box-trim` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box-trim).
396///
397/// The text-box CSS property sets the spacing above and below text based on a font's typographic features. For example, text-box: trim-both ex alphabetic trims the top to the top of the letter x and the bottom to the bottom of most letters, without descenders.
398///
399/// The grammar is defined as:
400///
401/// ```text,ignore
402/// none | trim-start | trim-end | trim-both
403/// ```
404///
405/// https://drafts.csswg.org/css-inline-3/#text-box-trim
406#[syntax(" none | trim-start | trim-end | trim-both ")]
407#[derive(
408	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
409)]
410#[declaration_metadata(
411    initial = "none",
412    applies_to = Unknown,
413    animation_type = Discrete,
414    property_group = Inline,
415    computed_value_type = Unknown,
416    canonical_order = "per grammar",
417)]
418#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
419#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box-trim"))]
420#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
421pub enum TextBoxTrimStyleValue {}
422
423// /// Represents the style value for `vertical-align` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#vertical-align).
424// ///
425// /// The vertical-align CSS property sets the vertical alignment of inline, inline-block, and table cell elements. It has no effect on block-level elements.
426// ///
427// /// The grammar is defined as:
428// ///
429// /// ```text,ignore
430// /// [ first | last] || <'alignment-baseline'> || <'baseline-shift'>
431// /// ```
432// ///
433// /// https://drafts.csswg.org/css-inline-3/#vertical-align
434// #[syntax(" [ first | last] || <'alignment-baseline'> || <'baseline-shift'> ")]
435// #[derive(
436//     Parse,
437//     Peek,
438//     ToSpan,
439//     ToCursors,
440//     DeclarationMetadata,
441//     SemanticEq,
442//     Debug,
443//     Clone,
444//     PartialEq,
445//     Eq,
446//     PartialOrd,
447//     Ord,
448//     Hash,
449// )]
450// #[declaration_metadata(
451//     initial = "baseline",
452//     applies_to = Unknown,
453//     animation_type = Unknown,
454//     property_group = Inline,
455//     computed_value_type = Unknown,
456//     canonical_order = "per grammar",
457// )]
458// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
459// #[cfg_attr(
460//     feature = "css_feature_data",
461//     derive(ToCSSFeature),
462//     css_feature("css.properties.vertical-align")
463// )]
464// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
465// pub struct VerticalAlignStyleValue;