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