Skip to main content

css_ast/values/inline/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/e8f0279ce0beff5d70e59fa4165a668e1527fff6
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(" normal | <number [1,∞]> <integer [1,∞]> | <number [1,∞]> && [ drop | raise ]? ")]
140#[derive(
141	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
142)]
143#[declaration_metadata(
144    initial = "normal",
145    applies_to = Unknown,
146    animation_type = ByComputedValue,
147    property_group = Inline,
148    computed_value_type = Unknown,
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.initial-letter"))]
153#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
154#[derive(csskit_derives::NodeWithMetadata)]
155pub enum InitialLetterStyleValue {}
156
157// /// Represents the style value for `initial-letter-align` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#initial-letter-align).
158// ///
159// /// The grammar is defined as:
160// ///
161// /// ```text,ignore
162// /// [ border-box? [ alphabetic | ideographic | hanging | leading ]? ]!
163// /// ```
164// ///
165// /// https://drafts.csswg.org/css-inline-3/#initial-letter-align
166// #[syntax(" [ border-box? [ alphabetic | ideographic | hanging | leading ]? ]! ")]
167// #[derive(
168//     Parse,
169//     Peek,
170//     ToSpan,
171//     ToCursors,
172//     DeclarationMetadata,
173//     SemanticEq,
174//     Debug,
175//     Clone,
176//     PartialEq,
177//     Eq,
178//     PartialOrd,
179//     Ord,
180//     Hash,
181// )]
182// #[declaration_metadata(
183//     initial = "alphabetic",
184//     inherits,
185//     applies_to = Unknown,
186//     animation_type = Discrete,
187//     property_group = Inline,
188//     computed_value_type = Unknown,
189//     canonical_order = "per grammar",
190// )]
191// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
192// #[cfg_attr(
193//     feature = "css_feature_data",
194//     derive(ToCSSFeature),
195//     css_feature("css.properties.initial-letter-align")
196// )]
197// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
198// #[derive(csskit_derives::NodeWithMetadata)]
199// pub struct InitialLetterAlignStyleValue;
200
201/// Represents the style value for `initial-letter-wrap` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#initial-letter-wrap).
202///
203/// The grammar is defined as:
204///
205/// ```text,ignore
206/// none | first | all | grid | <length-percentage>
207/// ```
208///
209/// https://drafts.csswg.org/css-inline-3/#initial-letter-wrap
210#[syntax(" none | first | all | grid | <length-percentage> ")]
211#[derive(
212	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
213)]
214#[declaration_metadata(
215    initial = "none",
216    inherits,
217    applies_to = Unknown,
218    animation_type = ByComputedValue,
219    percentages = Unknown,
220    property_group = Inline,
221    computed_value_type = Unknown,
222    canonical_order = "per grammar",
223)]
224#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
225#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.initial-letter-wrap"))]
226#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
227#[derive(csskit_derives::NodeWithMetadata)]
228pub enum InitialLetterWrapStyleValue {}
229
230/// Represents the style value for `inline-sizing` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#inline-sizing).
231///
232/// The grammar is defined as:
233///
234/// ```text,ignore
235/// normal | stretch
236/// ```
237///
238/// https://drafts.csswg.org/css-inline-3/#inline-sizing
239#[syntax(" normal | stretch ")]
240#[derive(
241	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
242)]
243#[declaration_metadata(
244    initial = "normal",
245    inherits,
246    applies_to = Unknown,
247    animation_type = Discrete,
248    property_group = Inline,
249    computed_value_type = Unknown,
250    canonical_order = "per grammar",
251)]
252#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
253#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.inline-sizing"))]
254#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
255#[derive(csskit_derives::NodeWithMetadata)]
256pub enum InlineSizingStyleValue {}
257
258/// Represents the style value for `line-fit-edge` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#line-fit-edge).
259///
260/// The grammar is defined as:
261///
262/// ```text,ignore
263/// leading | <text-edge>
264/// ```
265///
266/// https://drafts.csswg.org/css-inline-3/#line-fit-edge
267#[syntax(" leading | <text-edge> ")]
268#[derive(
269	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
270)]
271#[declaration_metadata(
272    initial = "leading",
273    inherits,
274    applies_to = Unknown,
275    animation_type = Discrete,
276    property_group = Inline,
277    computed_value_type = Unknown,
278    canonical_order = "per grammar",
279)]
280#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
281#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.line-fit-edge"))]
282#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
283#[derive(csskit_derives::NodeWithMetadata)]
284pub enum LineFitEdgeStyleValue {}
285
286/// Represents the style value for `line-height` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#line-height).
287///
288/// The line-height CSS property sets the spacing between text baselines, oriented to the horizontal or vertical writing mode.
289///
290/// The grammar is defined as:
291///
292/// ```text,ignore
293/// normal | <number [0,∞]> | <length-percentage [0,∞]>
294/// ```
295///
296/// https://drafts.csswg.org/css-inline-3/#line-height
297#[syntax(" normal | <number [0,∞]> | <length-percentage [0,∞]> ")]
298#[derive(
299	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
300)]
301#[declaration_metadata(
302    initial = "normal",
303    inherits,
304    applies_to = Unknown,
305    animation_type = ByComputedValue,
306    percentages = Unknown,
307    shorthand_group = Font,
308    property_group = Inline,
309    computed_value_type = Unknown,
310    canonical_order = "per grammar",
311    unitless_zero_resolves = Number,
312)]
313#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
314#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.line-height"))]
315#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
316#[derive(csskit_derives::NodeWithMetadata)]
317pub enum LineHeightStyleValue {}
318
319/// Represents the style value for `text-box` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box).
320///
321/// 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.
322///
323/// The grammar is defined as:
324///
325/// ```text,ignore
326/// normal | <'text-box-trim'> || <'text-box-edge'>
327/// ```
328///
329/// https://drafts.csswg.org/css-inline-3/#text-box
330#[syntax(" normal | <'text-box-trim'> || <'text-box-edge'> ")]
331#[derive(
332	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
333)]
334#[declaration_metadata(
335    initial = "normal",
336    applies_to = Unknown,
337    animation_type = Discrete,
338    longhands = TextBoxEdge|TextBoxTrim,
339    property_group = Inline,
340    computed_value_type = Unknown,
341    canonical_order = "per grammar",
342)]
343#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
344#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box"))]
345#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
346#[derive(csskit_derives::NodeWithMetadata)]
347pub struct TextBoxStyleValue;
348
349/// Represents the style value for `text-box-edge` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box-edge).
350///
351/// 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.
352///
353/// The grammar is defined as:
354///
355/// ```text,ignore
356/// auto | <text-edge>
357/// ```
358///
359/// https://drafts.csswg.org/css-inline-3/#text-box-edge
360#[syntax(" auto | <text-edge> ")]
361#[derive(
362	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
363)]
364#[declaration_metadata(
365    initial = "auto",
366    inherits,
367    applies_to = Unknown,
368    animation_type = Discrete,
369    shorthand_group = TextBox,
370    property_group = Inline,
371    computed_value_type = Unknown,
372    canonical_order = "per grammar",
373)]
374#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
375#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box-edge"))]
376#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
377#[derive(csskit_derives::NodeWithMetadata)]
378pub struct TextBoxEdgeStyleValue;
379
380/// Represents the style value for `text-box-trim` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box-trim).
381///
382/// 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.
383///
384/// The grammar is defined as:
385///
386/// ```text,ignore
387/// none | trim-start | trim-end | trim-both
388/// ```
389///
390/// https://drafts.csswg.org/css-inline-3/#text-box-trim
391#[syntax(" none | trim-start | trim-end | trim-both ")]
392#[derive(
393	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
394)]
395#[declaration_metadata(
396    initial = "none",
397    applies_to = Unknown,
398    animation_type = Discrete,
399    shorthand_group = TextBox,
400    property_group = Inline,
401    computed_value_type = Unknown,
402    canonical_order = "per grammar",
403)]
404#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
405#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box-trim"))]
406#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
407#[derive(csskit_derives::NodeWithMetadata)]
408pub enum TextBoxTrimStyleValue {}
409
410/// Represents the style value for `vertical-align` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#vertical-align).
411///
412/// 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.
413///
414/// The grammar is defined as:
415///
416/// ```text,ignore
417/// [ first | last] || <'alignment-baseline'> || <'baseline-shift'>
418/// ```
419///
420/// https://drafts.csswg.org/css-inline-3/#vertical-align
421#[syntax(" [ first | last] || <'alignment-baseline'> || <'baseline-shift'> ")]
422#[derive(
423	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
424)]
425#[declaration_metadata(
426    initial = "baseline",
427    applies_to = Unknown,
428    animation_type = Unknown,
429    property_group = Inline,
430    computed_value_type = Unknown,
431    canonical_order = "per grammar",
432)]
433#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
434#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.vertical-align"))]
435#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
436#[derive(csskit_derives::NodeWithMetadata)]
437pub enum VerticalAlignStyleValue {}