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/ddbceaa3cee88f134d557c3051c26fcb5554a535
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,
31//     Peek,
32//     ToSpan,
33//     ToCursors,
34//     DeclarationMetadata,
35//     SemanticEq,
36//     Debug,
37//     Clone,
38//     PartialEq,
39//     Eq,
40//     PartialOrd,
41//     Ord,
42//     Hash,
43// )]
44// #[declaration_metadata(
45//     initial = "see individual properties",
46//     inherits,
47//     applies_to = Elements|Text,
48//     animation_type = Unknown,
49//     percentages = Unknown,
50//     longhands = FontFamily|FontSize|FontStretch|FontStyle|FontVariant|FontVariantAlternates|FontVariantCaps|FontVariantEastAsian|FontVariantEmoji|FontVariantLigatures|FontVariantNumeric|FontVariantPosition|FontWeight|LineHeight,
51//     property_group = Fonts,
52//     computed_value_type = Unknown,
53//     canonical_order = "per grammar",
54// )]
55// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
56// #[cfg_attr(
57//     feature = "css_feature_data",
58//     derive(ToCSSFeature),
59//     css_feature("css.properties.font")
60// )]
61// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
62// #[derive(csskit_derives::NodeWithMetadata)]
63// pub enum FontStyleValue<'a> {}
64
65/// Represents the style value for `font-family` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-family).
66///
67/// The font-family CSS property sets the desired font face for text, along with optional fallback font faces.
68///
69/// The grammar is defined as:
70///
71/// ```text,ignore
72/// [ <font-family-name> | <generic-font-family> ]#
73/// ```
74///
75/// https://drafts.csswg.org/css-fonts-5/#font-family
76#[syntax(" [ <font-family-name> | <generic-font-family> ]# ")]
77#[derive(
78	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
79)]
80#[declaration_metadata(
81    initial = "depends on user agent",
82    inherits,
83    applies_to = Elements|Text,
84    animation_type = Discrete,
85    shorthand_group = Font,
86    property_group = Fonts,
87    computed_value_type = Unknown,
88    canonical_order = "per grammar",
89)]
90#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
91#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-family"))]
92#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
93#[derive(csskit_derives::NodeWithMetadata)]
94pub struct FontFamilyStyleValue<'a>;
95
96/// Represents the style value for `font-feature-settings` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-feature-settings).
97///
98/// The font-feature-settings CSS property sets low-level OpenType feature tags for a font. When possible, use font-variant instead.
99///
100/// The grammar is defined as:
101///
102/// ```text,ignore
103/// normal | <feature-tag-value>#
104/// ```
105///
106/// https://drafts.csswg.org/css-fonts-5/#font-feature-settings
107#[syntax(" normal | <feature-tag-value># ")]
108#[derive(
109	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
110)]
111#[declaration_metadata(
112    initial = "normal",
113    inherits,
114    applies_to = Elements|Text,
115    animation_type = Discrete,
116    property_group = Fonts,
117    computed_value_type = AsSpecified,
118    canonical_order = "per grammar",
119)]
120#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
121#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-feature-settings"))]
122#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
123#[derive(csskit_derives::NodeWithMetadata)]
124pub struct FontFeatureSettingsStyleValue<'a>;
125
126/// Represents the style value for `font-kerning` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-kerning).
127///
128/// The font-kerning CSS property sets whether kerning data from a font is used to adjust the space between letters.
129///
130/// The grammar is defined as:
131///
132/// ```text,ignore
133/// auto | normal | none
134/// ```
135///
136/// https://drafts.csswg.org/css-fonts-5/#font-kerning
137#[syntax(" auto | normal | none ")]
138#[derive(
139	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
140)]
141#[declaration_metadata(
142    initial = "auto",
143    inherits,
144    applies_to = Elements|Text,
145    animation_type = Discrete,
146    property_group = Fonts,
147    computed_value_type = AsSpecified,
148    canonical_order = "per grammar",
149)]
150#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
151#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-kerning"))]
152#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
153#[derive(csskit_derives::NodeWithMetadata)]
154pub enum FontKerningStyleValue {}
155
156/// Represents the style value for `font-language-override` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-language-override).
157///
158/// The font-language-override CSS property sets which language-specific glyphs are displayed.
159///
160/// The grammar is defined as:
161///
162/// ```text,ignore
163/// normal | <string>
164/// ```
165///
166/// https://drafts.csswg.org/css-fonts-5/#font-language-override
167#[syntax(" normal | <string> ")]
168#[derive(
169	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
170)]
171#[declaration_metadata(
172    initial = "normal",
173    inherits,
174    applies_to = Elements|Text,
175    animation_type = Discrete,
176    property_group = Fonts,
177    computed_value_type = Unknown,
178    canonical_order = "per grammar",
179)]
180#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
181#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-language-override"))]
182#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
183#[derive(csskit_derives::NodeWithMetadata)]
184pub struct FontLanguageOverrideStyleValue;
185
186/// Represents the style value for `font-optical-sizing` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-optical-sizing).
187///
188/// The font-optical-sizing CSS property sets whether text rendering is optimized for viewing at different sizes.
189///
190/// The grammar is defined as:
191///
192/// ```text,ignore
193/// auto | none
194/// ```
195///
196/// https://drafts.csswg.org/css-fonts-5/#font-optical-sizing
197#[syntax(" auto | none ")]
198#[derive(
199	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
200)]
201#[declaration_metadata(
202    initial = "auto",
203    inherits,
204    applies_to = Elements|Text,
205    animation_type = Discrete,
206    property_group = Fonts,
207    computed_value_type = Unknown,
208    canonical_order = "per grammar",
209)]
210#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
211#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-optical-sizing"))]
212#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
213#[derive(csskit_derives::NodeWithMetadata)]
214pub enum FontOpticalSizingStyleValue {}
215
216/// Represents the style value for `font-palette` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-palette).
217///
218/// The font-palette CSS property selects a color palette from the font, optionally overriding individual colors in the @font-palette-values at-rule.
219///
220/// The grammar is defined as:
221///
222/// ```text,ignore
223/// normal | light | dark | <palette-identifier> | <palette-mix()>
224/// ```
225///
226/// https://drafts.csswg.org/css-fonts-5/#font-palette
227#[syntax(" normal | light | dark | <palette-identifier> | <palette-mix()> ")]
228#[derive(
229	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
230)]
231#[declaration_metadata(
232    initial = "normal",
233    inherits,
234    applies_to = Elements|Text,
235    animation_type = ByComputedValue,
236    property_group = Fonts,
237    computed_value_type = Unknown,
238    canonical_order = "per grammar",
239)]
240#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
241#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-palette"))]
242#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
243#[derive(csskit_derives::NodeWithMetadata)]
244pub enum FontPaletteStyleValue {}
245
246/// Represents the style value for `font-size` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-size).
247///
248/// The font-size CSS property sets the text height.
249///
250/// The grammar is defined as:
251///
252/// ```text,ignore
253/// <absolute-size> | <relative-size> | <length-percentage [0,∞]> | math
254/// ```
255///
256/// https://drafts.csswg.org/css-fonts-5/#font-size
257#[syntax(" <absolute-size> | <relative-size> | <length-percentage [0,∞]> | math ")]
258#[derive(
259	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
260)]
261#[declaration_metadata(
262    initial = "medium",
263    inherits,
264    applies_to = Elements|Text,
265    animation_type = ByComputedValue,
266    percentages = Unknown,
267    shorthand_group = Font,
268    property_group = Fonts,
269    computed_value_type = AbsoluteLength,
270    canonical_order = "per grammar",
271)]
272#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
273#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-size"))]
274#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
275#[derive(csskit_derives::NodeWithMetadata)]
276pub enum FontSizeStyleValue {}
277
278/// Represents the style value for `font-size-adjust` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-size-adjust).
279///
280/// 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.
281///
282/// The grammar is defined as:
283///
284/// ```text,ignore
285/// none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number [0,∞]> ]
286/// ```
287///
288/// https://drafts.csswg.org/css-fonts-5/#font-size-adjust
289#[syntax(" none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number [0,∞]> ] ")]
290#[derive(
291	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
292)]
293#[declaration_metadata(
294    initial = "none",
295    inherits,
296    applies_to = Elements|Text,
297    animation_type = Discrete,
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 {}
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    shorthand_group = 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 {}
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 = FontSynthesisPosition|FontSynthesisSmallCaps|FontSynthesisStyle|FontSynthesisWeight,
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;
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    shorthand_group = 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 {}
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    shorthand_group = 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 {}
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    shorthand_group = 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 {}
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    shorthand_group = 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 {}
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,
510//     Peek,
511//     ToSpan,
512//     ToCursors,
513//     DeclarationMetadata,
514//     SemanticEq,
515//     Debug,
516//     Clone,
517//     PartialEq,
518//     Eq,
519//     PartialOrd,
520//     Ord,
521//     Hash,
522// )]
523// #[declaration_metadata(
524//     initial = "normal",
525//     inherits,
526//     applies_to = Elements|Text,
527//     animation_type = Discrete,
528//     shorthand_group = Font,
529//     longhands = FontVariantAlternates|FontVariantCaps|FontVariantEastAsian|FontVariantEmoji|FontVariantLigatures|FontVariantNumeric|FontVariantPosition,
530//     property_group = Fonts,
531//     computed_value_type = AsSpecified,
532//     canonical_order = "per grammar",
533// )]
534// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
535// #[cfg_attr(
536//     feature = "css_feature_data",
537//     derive(ToCSSFeature),
538//     css_feature("css.properties.font-variant")
539// )]
540// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
541// #[derive(csskit_derives::NodeWithMetadata)]
542// pub enum FontVariantStyleValue<'a> {}
543
544// /// Represents the style value for `font-variant-alternates` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-alternates).
545// ///
546// /// The font-variant-alternates CSS property, along with the @font-feature-values at-rule, chooses when to use a font's alternate glyphs.
547// ///
548// /// The grammar is defined as:
549// ///
550// /// ```text,ignore
551// /**normal | [ stylistic(<font-feature-value-name>) ||
552// historical-forms ||
553// styleset(<font-feature-value-name>#) ||
554// character-variant(<font-feature-value-name>#) ||
555// swash(<font-feature-value-name>) ||
556// ornaments(<font-feature-value-name>) ||
557// annotation(<font-feature-value-name>) ]*/
558// /// ```
559// ///
560// /// https://drafts.csswg.org/css-fonts-5/#font-variant-alternates
561// #[syntax(
562//     " 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>) ] "
563// )]
564// #[derive(
565//     Parse,
566//     Peek,
567//     ToSpan,
568//     ToCursors,
569//     DeclarationMetadata,
570//     SemanticEq,
571//     Debug,
572//     Clone,
573//     PartialEq,
574//     Eq,
575//     PartialOrd,
576//     Ord,
577//     Hash,
578// )]
579// #[declaration_metadata(
580//     initial = "normal",
581//     inherits,
582//     applies_to = Elements|Text,
583//     animation_type = Discrete,
584//     shorthand_group = Font,
585//     property_group = Fonts,
586//     computed_value_type = AsSpecified,
587//     canonical_order = "per grammar",
588// )]
589// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
590// #[cfg_attr(
591//     feature = "css_feature_data",
592//     derive(ToCSSFeature),
593//     css_feature("css.properties.font-variant-alternates")
594// )]
595// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
596// #[derive(csskit_derives::NodeWithMetadata)]
597// pub struct FontVariantAlternatesStyleValue<'a>;
598
599/// Represents the style value for `font-variant-caps` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-caps).
600///
601/// The font-variant-caps CSS property sets whether text should be displayed in small caps, petite caps, or with capital letters designed for titles.
602///
603/// The grammar is defined as:
604///
605/// ```text,ignore
606/// normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps
607/// ```
608///
609/// https://drafts.csswg.org/css-fonts-5/#font-variant-caps
610#[syntax(" normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ")]
611#[derive(
612	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
613)]
614#[declaration_metadata(
615    initial = "normal",
616    inherits,
617    applies_to = Elements|Text,
618    animation_type = Discrete,
619    shorthand_group = Font,
620    property_group = Fonts,
621    computed_value_type = AsSpecified,
622    canonical_order = "per grammar",
623)]
624#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
625#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-caps"))]
626#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
627#[derive(csskit_derives::NodeWithMetadata)]
628pub enum FontVariantCapsStyleValue {}
629
630/// 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).
631///
632/// The font-variant-east-asian CSS property controls glyph substitution and sizing in East Asian text.
633///
634/// The grammar is defined as:
635///
636/// ```text,ignore
637/// normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]
638/// ```
639///
640/// https://drafts.csswg.org/css-fonts-5/#font-variant-east-asian
641#[syntax(" normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ] ")]
642#[derive(
643	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
644)]
645#[declaration_metadata(
646    initial = "normal",
647    inherits,
648    applies_to = Elements|Text,
649    animation_type = Discrete,
650    shorthand_group = Font,
651    property_group = Fonts,
652    computed_value_type = AsSpecified,
653    canonical_order = "per grammar",
654)]
655#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
656#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-east-asian"))]
657#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
658#[derive(csskit_derives::NodeWithMetadata)]
659pub struct FontVariantEastAsianStyleValue;
660
661/// Represents the style value for `font-variant-emoji` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-emoji).
662///
663/// The font-variant-emoji CSS property sets the default presentation for emoji characters.
664///
665/// The grammar is defined as:
666///
667/// ```text,ignore
668/// normal | text | emoji | unicode
669/// ```
670///
671/// https://drafts.csswg.org/css-fonts-5/#font-variant-emoji
672#[syntax(" normal | text | emoji | unicode ")]
673#[derive(
674	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
675)]
676#[declaration_metadata(
677    initial = "normal",
678    inherits,
679    applies_to = Elements|Text,
680    animation_type = Discrete,
681    shorthand_group = Font,
682    property_group = Fonts,
683    computed_value_type = Unknown,
684    canonical_order = "per grammar",
685)]
686#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
687#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-emoji"))]
688#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
689#[derive(csskit_derives::NodeWithMetadata)]
690pub enum FontVariantEmojiStyleValue {}
691
692/// Represents the style value for `font-variant-ligatures` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-ligatures).
693///
694/// The font-variant-ligatures CSS property sets how characters can be visually combined for readability or stylistic reasons.
695///
696/// The grammar is defined as:
697///
698/// ```text,ignore
699/// normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]
700/// ```
701///
702/// https://drafts.csswg.org/css-fonts-5/#font-variant-ligatures
703#[syntax(
704	" normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ] "
705)]
706#[derive(
707	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
708)]
709#[declaration_metadata(
710    initial = "normal",
711    inherits,
712    applies_to = Elements|Text,
713    animation_type = Discrete,
714    shorthand_group = Font,
715    property_group = Fonts,
716    computed_value_type = AsSpecified,
717    canonical_order = "per grammar",
718)]
719#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
720#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-ligatures"))]
721#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
722#[derive(csskit_derives::NodeWithMetadata)]
723pub enum FontVariantLigaturesStyleValue {}
724
725/// Represents the style value for `font-variant-numeric` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-numeric).
726///
727/// 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.
728///
729/// The grammar is defined as:
730///
731/// ```text,ignore
732/// normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]
733/// ```
734///
735/// https://drafts.csswg.org/css-fonts-5/#font-variant-numeric
736#[syntax(
737	" normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ] "
738)]
739#[derive(
740	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
741)]
742#[declaration_metadata(
743    initial = "normal",
744    inherits,
745    applies_to = Elements|Text,
746    animation_type = Discrete,
747    shorthand_group = Font,
748    property_group = Fonts,
749    computed_value_type = AsSpecified,
750    canonical_order = "per grammar",
751)]
752#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
753#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-numeric"))]
754#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
755#[derive(csskit_derives::NodeWithMetadata)]
756pub struct FontVariantNumericStyleValue;
757
758/// Represents the style value for `font-variant-position` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-position).
759///
760/// The font-variant-position CSS property sets whether to use alternate glyphs for subscript and superscript text.
761///
762/// The grammar is defined as:
763///
764/// ```text,ignore
765/// normal | sub | super
766/// ```
767///
768/// https://drafts.csswg.org/css-fonts-5/#font-variant-position
769#[syntax(" normal | sub | super ")]
770#[derive(
771	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
772)]
773#[declaration_metadata(
774    initial = "normal",
775    inherits,
776    applies_to = Elements|Text,
777    animation_type = Discrete,
778    shorthand_group = Font,
779    property_group = Fonts,
780    computed_value_type = AsSpecified,
781    canonical_order = "per grammar",
782)]
783#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
784#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-position"))]
785#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
786#[derive(csskit_derives::NodeWithMetadata)]
787pub enum FontVariantPositionStyleValue {}
788
789/// Represents the style value for `font-variation-settings` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variation-settings).
790///
791/// 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.
792///
793/// The grammar is defined as:
794///
795/// ```text,ignore
796/// normal | [ <opentype-tag> <number> ]#
797/// ```
798///
799/// https://drafts.csswg.org/css-fonts-5/#font-variation-settings
800#[syntax(" normal | [ <opentype-tag> <number> ]# ")]
801#[derive(
802	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
803)]
804#[declaration_metadata(
805    initial = "normal",
806    inherits,
807    applies_to = Elements|Text,
808    animation_type = Unknown,
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-variation-settings"))]
815#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
816#[derive(csskit_derives::NodeWithMetadata)]
817pub struct FontVariationSettingsStyleValue<'a>;
818
819/// Represents the style value for `font-weight` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-weight).
820///
821/// 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.
822///
823/// The grammar is defined as:
824///
825/// ```text,ignore
826/// <font-weight-absolute> | bolder | lighter
827/// ```
828///
829/// https://drafts.csswg.org/css-fonts-5/#font-weight
830#[syntax(" <font-weight-absolute> | bolder | lighter ")]
831#[derive(
832	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
833)]
834#[declaration_metadata(
835    initial = "normal",
836    inherits,
837    applies_to = Elements|Text,
838    animation_type = ByComputedValue,
839    shorthand_group = Font,
840    property_group = Fonts,
841    computed_value_type = Unknown,
842    canonical_order = "per grammar",
843)]
844#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
845#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-weight"))]
846#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
847#[derive(csskit_derives::NodeWithMetadata)]
848pub enum FontWeightStyleValue {}
849
850/// Represents the style value for `font-width` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-width).
851///
852/// 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.
853///
854/// The grammar is defined as:
855///
856/// ```text,ignore
857/// normal | <percentage [0,∞]> | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded
858/// ```
859///
860/// https://drafts.csswg.org/css-fonts-5/#font-width
861#[syntax(
862	" normal | <percentage [0,∞]> | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded "
863)]
864#[derive(
865	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
866)]
867#[declaration_metadata(
868    initial = "normal",
869    inherits,
870    applies_to = Elements|Text,
871    animation_type = ByComputedValue,
872    percentages = None,
873    property_group = Fonts,
874    computed_value_type = Unknown,
875    canonical_order = "per grammar",
876)]
877#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
878#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-width"))]
879#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
880#[derive(csskit_derives::NodeWithMetadata)]
881pub enum FontWidthStyleValue {}