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