Skip to main content

css_ast/values/fonts/
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-fonts-5/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `font` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font).
11///
12/// The font CSS property shorthand sets multiple font properties, including style, weight, size, and font family.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/**[ [ <'font-style'> ||
18<font-variant-css2> ||
19<'font-weight'> ||
20<font-width-css3> ]? <'font-size'> [ / <'line-height'> ]?
21<'font-family'># ] |
22<system-font-family-name>*/
23/// ```
24///
25/// https://drafts.csswg.org/css-fonts-5/#font
26#[syntax(
27	" [ [ <'font-style'> || <font-variant-css2> || <'font-weight'> || <font-width-css3> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'># ] | <system-font-family-name> "
28)]
29#[derive(
30	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
31)]
32#[declaration_metadata(
33    initial = "see individual properties",
34    inherits,
35    applies_to = Elements|Text,
36    animation_type = Unknown,
37    percentages = Unknown,
38    longhands = FontFamily|FontSize|FontStretch|FontStyle|FontVariant|FontVariantAlternates|FontVariantCaps|FontVariantEastAsian|FontVariantEmoji|FontVariantLigatures|FontVariantNumeric|FontVariantPosition|FontWeight|LineHeight,
39    property_group = Fonts,
40    computed_value_type = Unknown,
41    canonical_order = "per grammar",
42)]
43#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
44#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font"))]
45#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
46#[derive(csskit_derives::NodeWithMetadata)]
47pub enum FontStyleValue<'a> {}
48
49/// Represents the style value for `font-family` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-family).
50///
51/// The font-family CSS property sets the desired font face for text, along with optional fallback font faces.
52///
53/// The grammar is defined as:
54///
55/// ```text,ignore
56/// [ <font-family-name> | <generic-font-family> ]#
57/// ```
58///
59/// https://drafts.csswg.org/css-fonts-5/#font-family
60#[syntax(" [ <font-family-name> | <generic-font-family> ]# ")]
61#[derive(
62	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
63)]
64#[declaration_metadata(
65    initial = "depends on user agent",
66    inherits,
67    applies_to = Elements|Text,
68    animation_type = Discrete,
69    shorthand_group = Font,
70    property_group = Fonts,
71    computed_value_type = Unknown,
72    canonical_order = "per grammar",
73)]
74#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
75#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-family"))]
76#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
77#[derive(csskit_derives::NodeWithMetadata)]
78pub struct FontFamilyStyleValue<'a>;
79
80/// Represents the style value for `font-feature-settings` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-feature-settings).
81///
82/// The font-feature-settings CSS property sets low-level OpenType feature tags for a font. When possible, use font-variant instead.
83///
84/// The grammar is defined as:
85///
86/// ```text,ignore
87/// normal | <feature-tag-value>#
88/// ```
89///
90/// https://drafts.csswg.org/css-fonts-5/#font-feature-settings
91#[syntax(" normal | <feature-tag-value># ")]
92#[derive(
93	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
94)]
95#[declaration_metadata(
96    initial = "normal",
97    inherits,
98    applies_to = Elements|Text,
99    animation_type = Discrete,
100    property_group = Fonts,
101    computed_value_type = AsSpecified,
102    canonical_order = "per grammar",
103)]
104#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
105#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-feature-settings"))]
106#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
107#[derive(csskit_derives::NodeWithMetadata)]
108pub struct FontFeatureSettingsStyleValue<'a>;
109
110/// Represents the style value for `font-kerning` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-kerning).
111///
112/// The font-kerning CSS property sets whether kerning data from a font is used to adjust the space between letters.
113///
114/// The grammar is defined as:
115///
116/// ```text,ignore
117/// auto | normal | none
118/// ```
119///
120/// https://drafts.csswg.org/css-fonts-5/#font-kerning
121#[syntax(" auto | normal | none ")]
122#[derive(
123	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
124)]
125#[declaration_metadata(
126    initial = "auto",
127    inherits,
128    applies_to = Elements|Text,
129    animation_type = Discrete,
130    property_group = Fonts,
131    computed_value_type = AsSpecified,
132    canonical_order = "per grammar",
133)]
134#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
135#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-kerning"))]
136#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
137#[derive(csskit_derives::NodeWithMetadata)]
138pub enum FontKerningStyleValue<'a> {}
139
140/// Represents the style value for `font-language-override` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-language-override).
141///
142/// The font-language-override CSS property sets which language-specific glyphs are displayed.
143///
144/// The grammar is defined as:
145///
146/// ```text,ignore
147/// normal | <string>
148/// ```
149///
150/// https://drafts.csswg.org/css-fonts-5/#font-language-override
151#[syntax(" normal | <string> ")]
152#[derive(
153	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
154)]
155#[declaration_metadata(
156    initial = "normal",
157    inherits,
158    applies_to = Elements|Text,
159    animation_type = Discrete,
160    property_group = Fonts,
161    computed_value_type = Unknown,
162    canonical_order = "per grammar",
163)]
164#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
165#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-language-override"))]
166#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
167#[derive(csskit_derives::NodeWithMetadata)]
168pub struct FontLanguageOverrideStyleValue<'a>;
169
170/// Represents the style value for `font-optical-sizing` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-optical-sizing).
171///
172/// The font-optical-sizing CSS property sets whether text rendering is optimized for viewing at different sizes.
173///
174/// The grammar is defined as:
175///
176/// ```text,ignore
177/// auto | none
178/// ```
179///
180/// https://drafts.csswg.org/css-fonts-5/#font-optical-sizing
181#[syntax(" auto | none ")]
182#[derive(
183	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
184)]
185#[declaration_metadata(
186    initial = "auto",
187    inherits,
188    applies_to = Elements|Text,
189    animation_type = Discrete,
190    property_group = Fonts,
191    computed_value_type = Unknown,
192    canonical_order = "per grammar",
193)]
194#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
195#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-optical-sizing"))]
196#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
197#[derive(csskit_derives::NodeWithMetadata)]
198pub enum FontOpticalSizingStyleValue<'a> {}
199
200/// Represents the style value for `font-palette` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-palette).
201///
202/// The font-palette CSS property selects a color palette from the font, optionally overriding individual colors in the @font-palette-values at-rule.
203///
204/// The grammar is defined as:
205///
206/// ```text,ignore
207/// normal | light | dark | <palette-identifier> | <palette-mix()>
208/// ```
209///
210/// https://drafts.csswg.org/css-fonts-5/#font-palette
211#[syntax(" normal | light | dark | <palette-identifier> | <palette-mix()> ")]
212#[derive(
213	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
214)]
215#[declaration_metadata(
216    initial = "normal",
217    inherits,
218    applies_to = Elements|Text,
219    animation_type = ByComputedValue,
220    property_group = Fonts,
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.font-palette"))]
226#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
227#[derive(csskit_derives::NodeWithMetadata)]
228pub enum FontPaletteStyleValue<'a> {}
229
230/// Represents the style value for `font-size` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-size).
231///
232/// The font-size CSS property sets the text height.
233///
234/// The grammar is defined as:
235///
236/// ```text,ignore
237/// <absolute-size> | <relative-size> | <length-percentage [0,∞]> | math
238/// ```
239///
240/// https://drafts.csswg.org/css-fonts-5/#font-size
241#[syntax(" <absolute-size> | <relative-size> | <length-percentage [0,∞]> | math ")]
242#[derive(
243	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
244)]
245#[declaration_metadata(
246    initial = "medium",
247    inherits,
248    applies_to = Elements|Text,
249    animation_type = ByComputedValue,
250    percentages = Unknown,
251    shorthand_group = Font,
252    property_group = Fonts,
253    computed_value_type = AbsoluteLength,
254    canonical_order = "per grammar",
255)]
256#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
257#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-size"))]
258#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
259#[derive(csskit_derives::NodeWithMetadata)]
260pub enum FontSizeStyleValue<'a> {}
261
262/// Represents the style value for `font-size-adjust` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-size-adjust).
263///
264/// The font-size-adjust CSS property preserves apparent text size, regardless of the font used, by scaling fonts to the same size with respect to a specific metric, such as x-height. This can help make fallback fonts look the same size.
265///
266/// The grammar is defined as:
267///
268/// ```text,ignore
269/// none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number [0,∞]> ]
270/// ```
271///
272/// https://drafts.csswg.org/css-fonts-5/#font-size-adjust
273#[syntax(" none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number [0,∞]> ] ")]
274#[derive(
275	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
276)]
277#[declaration_metadata(
278    initial = "none",
279    inherits,
280    applies_to = Elements|Text,
281    animation_type = Discrete,
282    property_group = Fonts,
283    computed_value_type = Unknown,
284    canonical_order = "per grammar",
285)]
286#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
287#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-size-adjust"))]
288#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
289#[derive(csskit_derives::NodeWithMetadata)]
290pub enum FontSizeAdjustStyleValue<'a> {}
291
292/// Represents the style value for `font-style` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-style).
293///
294/// The font-style CSS property sets the text style, with normal, italic, and oblique options.
295///
296/// The grammar is defined as:
297///
298/// ```text,ignore
299/// normal | italic | left | right | oblique <angle [-90deg,90deg]>?
300/// ```
301///
302/// https://drafts.csswg.org/css-fonts-5/#font-style
303#[syntax(" normal | italic | left | right | oblique <angle [-90deg,90deg]>? ")]
304#[derive(
305	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
306)]
307#[declaration_metadata(
308    initial = "normal",
309    inherits,
310    applies_to = Elements|Text,
311    animation_type = ByComputedValue,
312    shorthand_group = Font,
313    property_group = Fonts,
314    computed_value_type = Unknown,
315    canonical_order = "per grammar",
316)]
317#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
318#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-style"))]
319#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
320#[derive(csskit_derives::NodeWithMetadata)]
321pub enum FontStyleStyleValue<'a> {}
322
323/// Represents the style value for `font-synthesis` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-synthesis).
324///
325/// The font-synthesis CSS shorthand property disables all font synthesis except the given kinds. To disable a specific kind of font synthesis, instead use the longhand properties such as font-synthesis-style and font-synthesis-weight.
326///
327/// The grammar is defined as:
328///
329/// ```text,ignore
330/// none | [ weight || style || small-caps || position]
331/// ```
332///
333/// https://drafts.csswg.org/css-fonts-5/#font-synthesis
334#[syntax(" none | [ weight || style || small-caps || position] ")]
335#[derive(
336	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
337)]
338#[declaration_metadata(
339    initial = "weight style small-caps position",
340    inherits,
341    applies_to = Elements|Text,
342    animation_type = Discrete,
343    longhands = FontSynthesisPosition|FontSynthesisSmallCaps|FontSynthesisStyle|FontSynthesisWeight,
344    property_group = Fonts,
345    computed_value_type = Unknown,
346    canonical_order = "per grammar",
347)]
348#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
349#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis"))]
350#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
351#[derive(csskit_derives::NodeWithMetadata)]
352pub struct FontSynthesisStyleValue<'a>;
353
354/// Represents the style value for `font-synthesis-position` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-synthesis-position).
355///
356/// The font-synthesis-position CSS property sets whether or not the browser should synthesize subscript and superscript typefaces when they're missing from the font.
357///
358/// The grammar is defined as:
359///
360/// ```text,ignore
361/// auto | none
362/// ```
363///
364/// https://drafts.csswg.org/css-fonts-5/#font-synthesis-position
365#[syntax(" auto | none ")]
366#[derive(
367	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
368)]
369#[declaration_metadata(
370    initial = "auto",
371    inherits,
372    applies_to = Elements|Text,
373    animation_type = Discrete,
374    shorthand_group = FontSynthesis,
375    property_group = Fonts,
376    computed_value_type = Unknown,
377    canonical_order = "per grammar",
378)]
379#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
380#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis-position"))]
381#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
382#[derive(csskit_derives::NodeWithMetadata)]
383pub enum FontSynthesisPositionStyleValue<'a> {}
384
385/// Represents the style value for `font-synthesis-small-caps` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-synthesis-small-caps).
386///
387/// The font-synthesis-small-caps CSS property sets whether or not the browser should synthesize small caps typefaces when they're missing from the font.
388///
389/// The grammar is defined as:
390///
391/// ```text,ignore
392/// auto | none
393/// ```
394///
395/// https://drafts.csswg.org/css-fonts-5/#font-synthesis-small-caps
396#[syntax(" auto | none ")]
397#[derive(
398	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
399)]
400#[declaration_metadata(
401    initial = "auto",
402    inherits,
403    applies_to = Elements|Text,
404    animation_type = Discrete,
405    shorthand_group = FontSynthesis,
406    property_group = Fonts,
407    computed_value_type = Unknown,
408    canonical_order = "per grammar",
409)]
410#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
411#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis-small-caps"))]
412#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
413#[derive(csskit_derives::NodeWithMetadata)]
414pub enum FontSynthesisSmallCapsStyleValue<'a> {}
415
416/// Represents the style value for `font-synthesis-style` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-synthesis-style).
417///
418/// The font-synthesis-style CSS property sets whether or not the browser should synthesize italic and oblique typefaces when they're missing from the font.
419///
420/// The grammar is defined as:
421///
422/// ```text,ignore
423/// auto | none | oblique-only
424/// ```
425///
426/// https://drafts.csswg.org/css-fonts-5/#font-synthesis-style
427#[syntax(" auto | none | oblique-only ")]
428#[derive(
429	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
430)]
431#[declaration_metadata(
432    initial = "auto",
433    inherits,
434    applies_to = Elements|Text,
435    animation_type = Discrete,
436    shorthand_group = FontSynthesis,
437    property_group = Fonts,
438    computed_value_type = Unknown,
439    canonical_order = "per grammar",
440)]
441#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
442#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis-style"))]
443#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
444#[derive(csskit_derives::NodeWithMetadata)]
445pub enum FontSynthesisStyleStyleValue<'a> {}
446
447/// Represents the style value for `font-synthesis-weight` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-synthesis-weight).
448///
449/// The font-synthesis-weight CSS property sets whether or not the browser should synthesize bold typefaces when they're missing from the font.
450///
451/// The grammar is defined as:
452///
453/// ```text,ignore
454/// auto | none
455/// ```
456///
457/// https://drafts.csswg.org/css-fonts-5/#font-synthesis-weight
458#[syntax(" auto | none ")]
459#[derive(
460	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
461)]
462#[declaration_metadata(
463    initial = "auto",
464    inherits,
465    applies_to = Elements|Text,
466    animation_type = Discrete,
467    shorthand_group = FontSynthesis,
468    property_group = Fonts,
469    computed_value_type = Unknown,
470    canonical_order = "per grammar",
471)]
472#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
473#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis-weight"))]
474#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
475#[derive(csskit_derives::NodeWithMetadata)]
476pub enum FontSynthesisWeightStyleValue<'a> {}
477
478/// Represents the style value for `font-variant` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant).
479///
480/// The font-variant CSS property is a shorthand for font-variant-alternates, font-variant-caps, font-variant-east-asian, font-variant-emoji, font-variant-ligatures, font-variant-numeric, and font-variant-position.
481///
482/// The grammar is defined as:
483///
484/// ```text,ignore
485/// normal | none | [ [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ] || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || [ stylistic(<font-feature-value-name>) || historical-forms || styleset(<font-feature-value-name>#) || character-variant(<font-feature-value-name>#) || swash(<font-feature-value-name>) || ornaments(<font-feature-value-name>) || annotation(<font-feature-value-name>) ] || [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ] || [ <east-asian-variant-values> || <east-asian-width-values> || ruby ] || [ sub | super ] || [ text | emoji | unicode ] ]
486/// ```
487///
488/// https://drafts.csswg.org/css-fonts-5/#font-variant
489#[syntax(
490	" normal | none | [ [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ] || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || [ stylistic(<font-feature-value-name>) || historical-forms || styleset(<font-feature-value-name>#) || character-variant(<font-feature-value-name>#) || swash(<font-feature-value-name>) || ornaments(<font-feature-value-name>) || annotation(<font-feature-value-name>) ] || [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ] || [ <east-asian-variant-values> || <east-asian-width-values> || ruby ] || [ sub | super ] || [ text | emoji | unicode ] ] "
491)]
492#[derive(
493	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
494)]
495#[declaration_metadata(
496    initial = "normal",
497    inherits,
498    applies_to = Elements|Text,
499    animation_type = Discrete,
500    longhands = FontVariantAlternates|FontVariantCaps|FontVariantEastAsian|FontVariantEmoji|FontVariantLigatures|FontVariantNumeric|FontVariantPosition,
501    shorthand_group = Font,
502    property_group = Fonts,
503    computed_value_type = AsSpecified,
504    canonical_order = "per grammar",
505)]
506#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
507#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant"))]
508#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
509#[derive(csskit_derives::NodeWithMetadata)]
510pub enum FontVariantStyleValue<'a> {}
511
512/// Represents the style value for `font-variant-alternates` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-alternates).
513///
514/// The font-variant-alternates CSS property, along with the @font-feature-values at-rule, chooses when to use a font's alternate glyphs.
515///
516/// The grammar is defined as:
517///
518/// ```text,ignore
519/**normal | [ stylistic(<font-feature-value-name>) ||
520historical-forms ||
521styleset(<font-feature-value-name>#) ||
522character-variant(<font-feature-value-name>#) ||
523swash(<font-feature-value-name>) ||
524ornaments(<font-feature-value-name>) ||
525annotation(<font-feature-value-name>) ]*/
526/// ```
527///
528/// https://drafts.csswg.org/css-fonts-5/#font-variant-alternates
529#[syntax(
530	" normal | [ stylistic(<font-feature-value-name>) || historical-forms || styleset(<font-feature-value-name>#) || character-variant(<font-feature-value-name>#) || swash(<font-feature-value-name>) || ornaments(<font-feature-value-name>) || annotation(<font-feature-value-name>) ] "
531)]
532#[derive(
533	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
534)]
535#[declaration_metadata(
536    initial = "normal",
537    inherits,
538    applies_to = Elements|Text,
539    animation_type = Discrete,
540    shorthand_group = Font,
541    property_group = Fonts,
542    computed_value_type = AsSpecified,
543    canonical_order = "per grammar",
544)]
545#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
546#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-alternates"))]
547#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
548#[derive(csskit_derives::NodeWithMetadata)]
549pub struct FontVariantAlternatesStyleValue<'a>;
550
551/// Represents the style value for `font-variant-caps` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-caps).
552///
553/// The font-variant-caps CSS property sets whether text should be displayed in small caps, petite caps, or with capital letters designed for titles.
554///
555/// The grammar is defined as:
556///
557/// ```text,ignore
558/// normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps
559/// ```
560///
561/// https://drafts.csswg.org/css-fonts-5/#font-variant-caps
562#[syntax(" normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ")]
563#[derive(
564	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
565)]
566#[declaration_metadata(
567    initial = "normal",
568    inherits,
569    applies_to = Elements|Text,
570    animation_type = Discrete,
571    shorthand_group = Font,
572    property_group = Fonts,
573    computed_value_type = AsSpecified,
574    canonical_order = "per grammar",
575)]
576#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
577#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-caps"))]
578#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
579#[derive(csskit_derives::NodeWithMetadata)]
580pub enum FontVariantCapsStyleValue<'a> {}
581
582/// Represents the style value for `font-variant-east-asian` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-east-asian).
583///
584/// The font-variant-east-asian CSS property controls glyph substitution and sizing in East Asian text.
585///
586/// The grammar is defined as:
587///
588/// ```text,ignore
589/// normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]
590/// ```
591///
592/// https://drafts.csswg.org/css-fonts-5/#font-variant-east-asian
593#[syntax(" normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ] ")]
594#[derive(
595	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
596)]
597#[declaration_metadata(
598    initial = "normal",
599    inherits,
600    applies_to = Elements|Text,
601    animation_type = Discrete,
602    shorthand_group = Font,
603    property_group = Fonts,
604    computed_value_type = AsSpecified,
605    canonical_order = "per grammar",
606)]
607#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
608#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-east-asian"))]
609#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
610#[derive(csskit_derives::NodeWithMetadata)]
611pub struct FontVariantEastAsianStyleValue<'a>;
612
613/// Represents the style value for `font-variant-emoji` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-emoji).
614///
615/// The font-variant-emoji CSS property sets the default presentation for emoji characters.
616///
617/// The grammar is defined as:
618///
619/// ```text,ignore
620/// normal | text | emoji | unicode
621/// ```
622///
623/// https://drafts.csswg.org/css-fonts-5/#font-variant-emoji
624#[syntax(" normal | text | emoji | unicode ")]
625#[derive(
626	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
627)]
628#[declaration_metadata(
629    initial = "normal",
630    inherits,
631    applies_to = Elements|Text,
632    animation_type = Discrete,
633    shorthand_group = Font,
634    property_group = Fonts,
635    computed_value_type = Unknown,
636    canonical_order = "per grammar",
637)]
638#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
639#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-emoji"))]
640#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
641#[derive(csskit_derives::NodeWithMetadata)]
642pub enum FontVariantEmojiStyleValue<'a> {}
643
644/// Represents the style value for `font-variant-ligatures` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-ligatures).
645///
646/// The font-variant-ligatures CSS property sets how characters can be visually combined for readability or stylistic reasons.
647///
648/// The grammar is defined as:
649///
650/// ```text,ignore
651/// normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]
652/// ```
653///
654/// https://drafts.csswg.org/css-fonts-5/#font-variant-ligatures
655#[syntax(
656	" normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ] "
657)]
658#[derive(
659	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
660)]
661#[declaration_metadata(
662    initial = "normal",
663    inherits,
664    applies_to = Elements|Text,
665    animation_type = Discrete,
666    shorthand_group = Font,
667    property_group = Fonts,
668    computed_value_type = AsSpecified,
669    canonical_order = "per grammar",
670)]
671#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
672#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-ligatures"))]
673#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
674#[derive(csskit_derives::NodeWithMetadata)]
675pub enum FontVariantLigaturesStyleValue<'a> {}
676
677/// Represents the style value for `font-variant-numeric` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-numeric).
678///
679/// The font-variant-numeric CSS property sets how numeric characters are displayed. For example, you can align columns of numbers or use zeroes that have a slash.
680///
681/// The grammar is defined as:
682///
683/// ```text,ignore
684/// normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]
685/// ```
686///
687/// https://drafts.csswg.org/css-fonts-5/#font-variant-numeric
688#[syntax(
689	" normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ] "
690)]
691#[derive(
692	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
693)]
694#[declaration_metadata(
695    initial = "normal",
696    inherits,
697    applies_to = Elements|Text,
698    animation_type = Discrete,
699    shorthand_group = Font,
700    property_group = Fonts,
701    computed_value_type = AsSpecified,
702    canonical_order = "per grammar",
703)]
704#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
705#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-numeric"))]
706#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
707#[derive(csskit_derives::NodeWithMetadata)]
708pub struct FontVariantNumericStyleValue<'a>;
709
710/// Represents the style value for `font-variant-position` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-position).
711///
712/// The font-variant-position CSS property sets whether to use alternate glyphs for subscript and superscript text.
713///
714/// The grammar is defined as:
715///
716/// ```text,ignore
717/// normal | sub | super
718/// ```
719///
720/// https://drafts.csswg.org/css-fonts-5/#font-variant-position
721#[syntax(" normal | sub | super ")]
722#[derive(
723	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
724)]
725#[declaration_metadata(
726    initial = "normal",
727    inherits,
728    applies_to = Elements|Text,
729    animation_type = Discrete,
730    shorthand_group = Font,
731    property_group = Fonts,
732    computed_value_type = AsSpecified,
733    canonical_order = "per grammar",
734)]
735#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
736#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-position"))]
737#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
738#[derive(csskit_derives::NodeWithMetadata)]
739pub enum FontVariantPositionStyleValue<'a> {}
740
741/// Represents the style value for `font-variation-settings` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variation-settings).
742///
743/// The font-variation-settings CSS property sets an "axis of variability" on a variable font, such as weight, optical size, or a custom axis defined by the typeface designer. When possible, use other CSS font properties, such as font-weight: bold. Also known as variable fonts.
744///
745/// The grammar is defined as:
746///
747/// ```text,ignore
748/// normal | [ <opentype-tag> <number> ]#
749/// ```
750///
751/// https://drafts.csswg.org/css-fonts-5/#font-variation-settings
752#[syntax(" normal | [ <opentype-tag> <number> ]# ")]
753#[derive(
754	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
755)]
756#[declaration_metadata(
757    initial = "normal",
758    inherits,
759    applies_to = Elements|Text,
760    animation_type = Unknown,
761    property_group = Fonts,
762    computed_value_type = Unknown,
763    canonical_order = "per grammar",
764)]
765#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
766#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variation-settings"))]
767#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
768#[derive(csskit_derives::NodeWithMetadata)]
769pub struct FontVariationSettingsStyleValue<'a>;
770
771/// Represents the style value for `font-weight` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-weight).
772///
773/// The font-weight CSS property controls the thickness of a font. It is set explicitly with the keyword bold or a number, or relative to the inherited thickness with the keywords bolder or lighter.
774///
775/// The grammar is defined as:
776///
777/// ```text,ignore
778/// <font-weight-absolute> | bolder | lighter
779/// ```
780///
781/// https://drafts.csswg.org/css-fonts-5/#font-weight
782#[syntax(" <font-weight-absolute> | bolder | lighter ")]
783#[derive(
784	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
785)]
786#[declaration_metadata(
787    initial = "normal",
788    inherits,
789    applies_to = Elements|Text,
790    animation_type = ByComputedValue,
791    shorthand_group = Font,
792    property_group = Fonts,
793    computed_value_type = Unknown,
794    canonical_order = "per grammar",
795)]
796#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
797#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-weight"))]
798#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
799#[derive(csskit_derives::NodeWithMetadata)]
800pub enum FontWeightStyleValue<'a> {}
801
802/// Represents the style value for `font-width` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-width).
803///
804/// The font-width CSS property selects a font face from a font family based on width, either by a keyword such as condensed or a percentage.
805///
806/// The grammar is defined as:
807///
808/// ```text,ignore
809/// normal | <percentage [0,∞]> | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded
810/// ```
811///
812/// https://drafts.csswg.org/css-fonts-5/#font-width
813#[syntax(
814	" normal | <percentage [0,∞]> | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded "
815)]
816#[derive(
817	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
818)]
819#[declaration_metadata(
820    initial = "normal",
821    inherits,
822    applies_to = Elements|Text,
823    animation_type = ByComputedValue,
824    percentages = None,
825    property_group = Fonts,
826    computed_value_type = Unknown,
827    canonical_order = "per grammar",
828)]
829#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
830#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-width"))]
831#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
832#[derive(csskit_derives::NodeWithMetadata)]
833pub enum FontWidthStyleValue<'a> {}