css_ast/values/inline/mod.rs
1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/58eb9b3f45e73a3e4ae51b253a25fa2a11ad142c
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 | <baseline-metric>
18/// ```
19///
20/// https://drafts.csswg.org/css-inline-3/#alignment-baseline
21#[syntax(" baseline | <baseline-metric> ")]
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 | <baseline-metric>
106/// ```
107///
108/// https://drafts.csswg.org/css-inline-3/#dominant-baseline
109#[syntax(" auto | <baseline-metric> ")]
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 struct 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, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
351)]
352#[declaration_metadata(
353 initial = "normal",
354 applies_to = Unknown,
355 animation_type = Discrete,
356 longhands = TextBoxEdge|TextBoxTrim,
357 property_group = Inline,
358 computed_value_type = Unknown,
359 canonical_order = "per grammar",
360)]
361#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
362#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box"))]
363#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
364#[derive(csskit_derives::NodeWithMetadata)]
365pub struct TextBoxStyleValue;
366
367/// Represents the style value for `text-box-edge` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box-edge).
368///
369/// 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.
370///
371/// The grammar is defined as:
372///
373/// ```text,ignore
374/// auto | <text-edge>
375/// ```
376///
377/// https://drafts.csswg.org/css-inline-3/#text-box-edge
378#[syntax(" auto | <text-edge> ")]
379#[derive(
380 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
381)]
382#[declaration_metadata(
383 initial = "auto",
384 inherits,
385 applies_to = Unknown,
386 animation_type = Discrete,
387 shorthand_group = TextBox,
388 property_group = Inline,
389 computed_value_type = Unknown,
390 canonical_order = "per grammar",
391)]
392#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
393#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box-edge"))]
394#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
395#[derive(csskit_derives::NodeWithMetadata)]
396pub struct TextBoxEdgeStyleValue;
397
398/// Represents the style value for `text-box-trim` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box-trim).
399///
400/// 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.
401///
402/// The grammar is defined as:
403///
404/// ```text,ignore
405/// none | trim-start | trim-end | trim-both
406/// ```
407///
408/// https://drafts.csswg.org/css-inline-3/#text-box-trim
409#[syntax(" none | trim-start | trim-end | trim-both ")]
410#[derive(
411 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
412)]
413#[declaration_metadata(
414 initial = "none",
415 applies_to = Unknown,
416 animation_type = Discrete,
417 shorthand_group = TextBox,
418 property_group = Inline,
419 computed_value_type = Unknown,
420 canonical_order = "per grammar",
421)]
422#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
423#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box-trim"))]
424#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
425#[derive(csskit_derives::NodeWithMetadata)]
426pub enum TextBoxTrimStyleValue {}
427
428// /// Represents the style value for `vertical-align` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#vertical-align).
429// ///
430// /// 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.
431// ///
432// /// The grammar is defined as:
433// ///
434// /// ```text,ignore
435// /// [ first | last] || <'alignment-baseline'> || <'baseline-shift'>
436// /// ```
437// ///
438// /// https://drafts.csswg.org/css-inline-3/#vertical-align
439// #[syntax(" [ first | last] || <'alignment-baseline'> || <'baseline-shift'> ")]
440// #[derive(
441// Parse,
442// Peek,
443// ToSpan,
444// ToCursors,
445// DeclarationMetadata,
446// SemanticEq,
447// Debug,
448// Clone,
449// PartialEq,
450// Eq,
451// PartialOrd,
452// Ord,
453// Hash,
454// )]
455// #[declaration_metadata(
456// initial = "baseline",
457// applies_to = Unknown,
458// animation_type = Unknown,
459// property_group = Inline,
460// computed_value_type = Unknown,
461// canonical_order = "per grammar",
462// )]
463// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
464// #[cfg_attr(
465// feature = "css_feature_data",
466// derive(ToCSSFeature),
467// css_feature("css.properties.vertical-align")
468// )]
469// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
470// #[derive(csskit_derives::NodeWithMetadata)]
471// pub struct VerticalAlignStyleValue;