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