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/40527902c4d0840cdb7a808c8cd42302be1c3bc8
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    shorthands = 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 = TextBoxTrim|TextBoxEdge,
323    property_group = Inline,
324    computed_value_type = Unknown,
325    canonical_order = "per grammar",
326)]
327#[declaration_writes(TextBoxTrim?, TextBoxEdge?)]
328#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
329#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box"))]
330#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
331#[derive(csskit_derives::NodeWithMetadata)]
332pub struct TextBoxStyleValue<'a>;
333
334/// Represents the style value for `text-box-edge` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box-edge).
335///
336/// 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.
337///
338/// The grammar is defined as:
339///
340/// ```text,ignore
341/// auto | <text-edge>
342/// ```
343///
344/// https://drafts.csswg.org/css-inline-3/#text-box-edge
345#[syntax(" auto | <text-edge> ")]
346#[derive(
347	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
348)]
349#[declaration_metadata(
350    initial = "auto",
351    inherits,
352    applies_to = Unknown,
353    animation_type = Discrete,
354    shorthands = TextBox,
355    property_group = Inline,
356    computed_value_type = Unknown,
357    canonical_order = "per grammar",
358)]
359#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
360#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box-edge"))]
361#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
362#[derive(csskit_derives::NodeWithMetadata)]
363pub struct TextBoxEdgeStyleValue<'a>;
364
365/// Represents the style value for `text-box-trim` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#text-box-trim).
366///
367/// 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.
368///
369/// The grammar is defined as:
370///
371/// ```text,ignore
372/// none | trim-start | trim-end | trim-both
373/// ```
374///
375/// https://drafts.csswg.org/css-inline-3/#text-box-trim
376#[syntax(" none | trim-start | trim-end | trim-both ")]
377#[derive(
378	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
379)]
380#[declaration_metadata(
381    initial = "none",
382    applies_to = Unknown,
383    animation_type = Discrete,
384    shorthands = TextBox,
385    property_group = Inline,
386    computed_value_type = Unknown,
387    canonical_order = "per grammar",
388)]
389#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
390#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-box-trim"))]
391#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
392#[derive(csskit_derives::NodeWithMetadata)]
393pub enum TextBoxTrimStyleValue<'a> {}
394
395/// Represents the style value for `vertical-align` as defined in [css-inline-3](https://drafts.csswg.org/css-inline-3/#vertical-align).
396///
397/// 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.
398///
399/// The grammar is defined as:
400///
401/// ```text,ignore
402/// [ first | last] || <'alignment-baseline'> || <'baseline-shift'>
403/// ```
404///
405/// https://drafts.csswg.org/css-inline-3/#vertical-align
406#[syntax(" [ first | last] || <'alignment-baseline'> || <'baseline-shift'> ")]
407#[derive(
408	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
409)]
410#[declaration_metadata(
411    initial = "baseline",
412    applies_to = Unknown,
413    animation_type = Unknown,
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.vertical-align"))]
420#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
421#[derive(csskit_derives::NodeWithMetadata)]
422pub enum VerticalAlignStyleValue<'a> {}