css_ast/values/fonts/mod.rs
1#![allow(warnings)]
2//! CSS Fonts Module Level 5
3//! https://drafts.csswg.org/css-fonts-5/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `font-family` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-family).
9///
10/// The font-family CSS property sets the desired font face for text, along with optional fallback font faces.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// [ <family-name> | <generic-family> ]#
16/// ```
17///
18// https://drafts.csswg.org/css-fonts-5/#font-family
19#[syntax(" [ <family-name> | <generic-family> ]# ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22 initial = "depends on user agent",
23 applies_to = "all elements and text",
24 inherited = "yes",
25 percentages = "n/a",
26 canonical_order = "per grammar",
27 animation_type = "discrete"
28)]
29#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-family"))]
31#[visit]
32pub struct FontFamilyStyleValue<'a>;
33
34/// Represents the style value for `font-weight` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-weight).
35///
36/// 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.
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// <font-weight-absolute> | bolder | lighter
42/// ```
43///
44// https://drafts.csswg.org/css-fonts-5/#font-weight
45#[syntax(" <font-weight-absolute> | bolder | lighter ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48 initial = "normal",
49 applies_to = "all elements and text",
50 inherited = "yes",
51 percentages = "n/a",
52 canonical_order = "per grammar",
53 animation_type = "by computed value type"
54)]
55#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
56#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-weight"))]
57#[visit]
58pub enum FontWeightStyleValue {}
59
60/// Represents the style value for `font-width` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-width).
61///
62/// 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.
63///
64/// The grammar is defined as:
65///
66/// ```text,ignore
67/// normal | <percentage [0,∞]> | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded
68/// ```
69///
70// https://drafts.csswg.org/css-fonts-5/#font-width
71#[syntax(
72 " normal | <percentage [0,∞]> | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded "
73)]
74#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
75#[style_value(
76 initial = "normal",
77 applies_to = "all elements and text",
78 inherited = "yes",
79 percentages = "not resolved",
80 canonical_order = "per grammar",
81 animation_type = "by computed value type"
82)]
83#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
84#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-width"))]
85#[visit]
86pub enum FontWidthStyleValue {}
87
88/// Represents the style value for `font-style` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-style).
89///
90/// The font-style CSS property sets the text style, with normal, italic, and oblique options.
91///
92/// The grammar is defined as:
93///
94/// ```text,ignore
95/// normal | italic | left | right | oblique <angle [-90deg,90deg]>?
96/// ```
97///
98// https://drafts.csswg.org/css-fonts-5/#font-style
99#[syntax(" normal | italic | left | right | oblique <angle [-90deg,90deg]>? ")]
100#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
101#[style_value(
102 initial = "normal",
103 applies_to = "all elements and text",
104 inherited = "yes",
105 percentages = "n/a",
106 canonical_order = "per grammar",
107 animation_type = "by computed value type;normal animates as oblique 0deg"
108)]
109#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
110#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-style"))]
111#[visit]
112pub enum FontStyleStyleValue {}
113
114/// Represents the style value for `font-size` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-size).
115///
116/// The font-size CSS property sets the text height.
117///
118/// The grammar is defined as:
119///
120/// ```text,ignore
121/// <absolute-size> | <relative-size> | <length-percentage [0,∞]> | math
122/// ```
123///
124// https://drafts.csswg.org/css-fonts-5/#font-size
125#[syntax(" <absolute-size> | <relative-size> | <length-percentage [0,∞]> | math ")]
126#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
127#[style_value(
128 initial = "medium",
129 applies_to = "all elements and text",
130 inherited = "yes",
131 percentages = "refer to parent element’s font size",
132 canonical_order = "per grammar",
133 animation_type = "by computed value type"
134)]
135#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
136#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-size"))]
137#[visit]
138pub enum FontSizeStyleValue {}
139
140// /// Represents the style value for `font-size-adjust` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-size-adjust).
141// ///
142// /// 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.
143// ///
144// /// The grammar is defined as:
145// ///
146// /// ```text,ignore
147// /// none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number [0,∞]> ]
148// /// ```
149// ///
150// // https://drafts.csswg.org/css-fonts-5/#font-size-adjust
151// #[syntax(" none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number [0,∞]> ] ")]
152// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
153// #[style_value(
154// initial = "none",
155// applies_to = "all elements and text",
156// inherited = "yes",
157// percentages = "n/a",
158// canonical_order = "per grammar",
159// animation_type = "discrete if the keywords differ, otherwise by computed value type",
160// )]
161// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
162// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-size-adjust"))]
163// #[visit]
164// pub enum FontSizeAdjustStyleValue {}
165
166// /// Represents the style value for `font` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font).
167// ///
168// /// The font CSS property shorthand sets multiple font properties, including style, weight, size, and font family.
169// ///
170// /// The grammar is defined as:
171// ///
172// /// ```text,ignore
173// /// [ [ <'font-style'> || <font-variant-css2> || <'font-weight'> || <font-width-css3> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'># ] | <system-family-name>
174// /// ```
175// ///
176// // https://drafts.csswg.org/css-fonts-5/#font
177// #[syntax(
178// " [ [ <'font-style'> || <font-variant-css2> || <'font-weight'> || <font-width-css3> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'># ] | <system-family-name> "
179// )]
180// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
181// #[style_value(
182// initial = "see individual properties",
183// applies_to = "all elements and text",
184// inherited = "yes",
185// percentages = "see individual properties",
186// canonical_order = "per grammar",
187// animation_type = "see individual properties",
188// )]
189// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
190// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font"))]
191// #[visit]
192// pub enum FontStyleValue<'a> {}
193
194/// Represents the style value for `font-synthesis-weight` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-synthesis-weight).
195///
196/// The font-synthesis-weight CSS property sets whether or not the browser should synthesize bold typefaces when they're missing from the font.
197///
198/// The grammar is defined as:
199///
200/// ```text,ignore
201/// auto | none
202/// ```
203///
204// https://drafts.csswg.org/css-fonts-5/#font-synthesis-weight
205#[syntax(" auto | none ")]
206#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
207#[style_value(
208 initial = "auto",
209 applies_to = "all elements and text",
210 inherited = "yes",
211 percentages = "n/a",
212 canonical_order = "per grammar",
213 animation_type = "discrete"
214)]
215#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
216#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis-weight"))]
217#[visit]
218pub enum FontSynthesisWeightStyleValue {}
219
220/// Represents the style value for `font-synthesis-style` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-synthesis-style).
221///
222/// 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.
223///
224/// The grammar is defined as:
225///
226/// ```text,ignore
227/// auto | none | oblique-only
228/// ```
229///
230// https://drafts.csswg.org/css-fonts-5/#font-synthesis-style
231#[syntax(" auto | none | oblique-only ")]
232#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
233#[style_value(
234 initial = "auto",
235 applies_to = "all elements and text",
236 inherited = "yes",
237 percentages = "n/a",
238 canonical_order = "per grammar",
239 animation_type = "discrete"
240)]
241#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
242#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis-style"))]
243#[visit]
244pub enum FontSynthesisStyleStyleValue {}
245
246/// 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).
247///
248/// 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.
249///
250/// The grammar is defined as:
251///
252/// ```text,ignore
253/// auto | none
254/// ```
255///
256// https://drafts.csswg.org/css-fonts-5/#font-synthesis-small-caps
257#[syntax(" auto | none ")]
258#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
259#[style_value(
260 initial = "auto",
261 applies_to = "all elements and text",
262 inherited = "yes",
263 percentages = "n/a",
264 canonical_order = "per grammar",
265 animation_type = "discrete"
266)]
267#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
268#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis-small-caps"))]
269#[visit]
270pub enum FontSynthesisSmallCapsStyleValue {}
271
272/// Represents the style value for `font-synthesis-position` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-synthesis-position).
273///
274/// 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.
275///
276/// The grammar is defined as:
277///
278/// ```text,ignore
279/// auto | none
280/// ```
281///
282// https://drafts.csswg.org/css-fonts-5/#font-synthesis-position
283#[syntax(" auto | none ")]
284#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
285#[style_value(
286 initial = "auto",
287 applies_to = "all elements and text",
288 inherited = "yes",
289 percentages = "n/a",
290 canonical_order = "per grammar",
291 animation_type = "discrete"
292)]
293#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
294#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis-position"))]
295#[visit]
296pub enum FontSynthesisPositionStyleValue {}
297
298// /// Represents the style value for `font-synthesis` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-synthesis).
299// ///
300// /// 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.
301// ///
302// /// The grammar is defined as:
303// ///
304// /// ```text,ignore
305// /// none | [ weight || style || small-caps || position]
306// /// ```
307// ///
308// // https://drafts.csswg.org/css-fonts-5/#font-synthesis
309// #[syntax(" none | [ weight || style || small-caps || position] ")]
310// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
311// #[style_value(
312// initial = "weight style small-caps position",
313// applies_to = "all elements and text",
314// inherited = "yes",
315// percentages = "n/a",
316// canonical_order = "per grammar",
317// animation_type = "discrete",
318// )]
319// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
320// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-synthesis"))]
321// #[visit]
322// pub enum FontSynthesisStyleValue {}
323
324/// Represents the style value for `font-kerning` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-kerning).
325///
326/// The font-kerning CSS property sets whether kerning data from a font is used to adjust the space between letters.
327///
328/// The grammar is defined as:
329///
330/// ```text,ignore
331/// auto | normal | none
332/// ```
333///
334// https://drafts.csswg.org/css-fonts-5/#font-kerning
335#[syntax(" auto | normal | none ")]
336#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
337#[style_value(
338 initial = "auto",
339 applies_to = "all elements and text",
340 inherited = "yes",
341 percentages = "n/a",
342 canonical_order = "per grammar",
343 animation_type = "discrete"
344)]
345#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
346#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-kerning"))]
347#[visit]
348pub enum FontKerningStyleValue {}
349
350// /// Represents the style value for `font-variant-ligatures` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-ligatures).
351// ///
352// /// The font-variant-ligatures CSS property sets how characters can be visually combined for readability or stylistic reasons.
353// ///
354// /// The grammar is defined as:
355// ///
356// /// ```text,ignore
357// /// normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]
358// /// ```
359// ///
360// // https://drafts.csswg.org/css-fonts-5/#font-variant-ligatures
361// #[syntax(
362// " normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ] "
363// )]
364// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
365// #[style_value(
366// initial = "normal",
367// applies_to = "all elements and text",
368// inherited = "yes",
369// percentages = "n/a",
370// canonical_order = "per grammar",
371// animation_type = "discrete",
372// )]
373// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
374// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-ligatures"))]
375// #[visit]
376// pub enum FontVariantLigaturesStyleValue {}
377
378/// Represents the style value for `font-variant-position` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-position).
379///
380/// The font-variant-position CSS property sets whether to use alternate glyphs for subscript and superscript text.
381///
382/// The grammar is defined as:
383///
384/// ```text,ignore
385/// normal | sub | super
386/// ```
387///
388// https://drafts.csswg.org/css-fonts-5/#font-variant-position
389#[syntax(" normal | sub | super ")]
390#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
391#[style_value(
392 initial = "normal",
393 applies_to = "all elements and text",
394 inherited = "yes",
395 percentages = "n/a",
396 canonical_order = "per grammar",
397 animation_type = "discrete"
398)]
399#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
400#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-position"))]
401#[visit]
402pub enum FontVariantPositionStyleValue {}
403
404/// Represents the style value for `font-variant-caps` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-caps).
405///
406/// The font-variant-caps CSS property sets whether text should be displayed in small caps, petite caps, or with capital letters designed for titles.
407///
408/// The grammar is defined as:
409///
410/// ```text,ignore
411/// normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps
412/// ```
413///
414// https://drafts.csswg.org/css-fonts-5/#font-variant-caps
415#[syntax(" normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ")]
416#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
417#[style_value(
418 initial = "normal",
419 applies_to = "all elements and text",
420 inherited = "yes",
421 percentages = "n/a",
422 canonical_order = "per grammar",
423 animation_type = "discrete"
424)]
425#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
426#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-caps"))]
427#[visit]
428pub enum FontVariantCapsStyleValue {}
429
430// /// Represents the style value for `font-variant-numeric` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-numeric).
431// ///
432// /// 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.
433// ///
434// /// The grammar is defined as:
435// ///
436// /// ```text,ignore
437// /// normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]
438// /// ```
439// ///
440// // https://drafts.csswg.org/css-fonts-5/#font-variant-numeric
441// #[syntax(
442// " normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ] "
443// )]
444// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
445// #[style_value(
446// initial = "normal",
447// applies_to = "all elements and text",
448// inherited = "yes",
449// percentages = "n/a",
450// canonical_order = "per grammar",
451// animation_type = "discrete",
452// )]
453// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
454// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-numeric"))]
455// #[visit]
456// pub enum FontVariantNumericStyleValue {}
457
458// /// Represents the style value for `font-variant-alternates` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-alternates).
459// ///
460// /// The font-variant-alternates CSS property, along with the @font-feature-values at-rule, chooses when to use a font's alternate glyphs.
461// ///
462// /// The grammar is defined as:
463// ///
464// /// ```text,ignore
465// /// normal | [ stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) ]
466// /// ```
467// ///
468// // https://drafts.csswg.org/css-fonts-5/#font-variant-alternates
469// #[syntax(
470// " normal | [ stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) ] "
471// )]
472// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
473// #[style_value(
474// initial = "normal",
475// applies_to = "all elements and text",
476// inherited = "yes",
477// percentages = "n/a",
478// canonical_order = "per grammar",
479// animation_type = "discrete",
480// )]
481// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
482// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-alternates"))]
483// #[visit]
484// pub enum FontVariantAlternatesStyleValue<'a> {}
485
486// /// 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).
487// ///
488// /// The font-variant-east-asian CSS property controls glyph substitution and sizing in East Asian text.
489// ///
490// /// The grammar is defined as:
491// ///
492// /// ```text,ignore
493// /// normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]
494// /// ```
495// ///
496// // https://drafts.csswg.org/css-fonts-5/#font-variant-east-asian
497// #[syntax(" normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ] ")]
498// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
499// #[style_value(
500// initial = "normal",
501// applies_to = "all elements and text",
502// inherited = "yes",
503// percentages = "n/a",
504// canonical_order = "per grammar",
505// animation_type = "discrete",
506// )]
507// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
508// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-east-asian"))]
509// #[visit]
510// pub enum FontVariantEastAsianStyleValue {}
511
512// /// Represents the style value for `font-variant` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant).
513// ///
514// /// 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.
515// ///
516// /// The grammar is defined as:
517// ///
518// /// ```text,ignore
519// /// 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(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<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 ] ]
520// /// ```
521// ///
522// // https://drafts.csswg.org/css-fonts-5/#font-variant
523// #[syntax(
524// " 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(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<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 ] ] "
525// )]
526// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
527// #[style_value(
528// initial = "normal",
529// applies_to = "all elements and text",
530// inherited = "yes",
531// percentages = "n/a",
532// canonical_order = "per grammar",
533// animation_type = "discrete",
534// )]
535// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
536// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant"))]
537// #[visit]
538// pub enum FontVariantStyleValue<'a> {}
539
540// /// Represents the style value for `font-feature-settings` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-feature-settings).
541// ///
542// /// The font-feature-settings CSS property sets low-level OpenType feature tags for a font. When possible, use font-variant instead.
543// ///
544// /// The grammar is defined as:
545// ///
546// /// ```text,ignore
547// /// normal | <feature-tag-value>#
548// /// ```
549// ///
550// // https://drafts.csswg.org/css-fonts-5/#font-feature-settings
551// #[syntax(" normal | <feature-tag-value># ")]
552// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
553// #[style_value(
554// initial = "normal",
555// applies_to = "all elements and text",
556// inherited = "yes",
557// percentages = "n/a",
558// canonical_order = "per grammar",
559// animation_type = "discrete",
560// )]
561// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
562// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-feature-settings"))]
563// #[visit]
564// pub enum FontFeatureSettingsStyleValue<'a> {}
565
566/// Represents the style value for `font-language-override` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-language-override).
567///
568/// The font-language-override CSS property sets which language-specific glyphs are displayed.
569///
570/// The grammar is defined as:
571///
572/// ```text,ignore
573/// normal | <string>
574/// ```
575///
576// https://drafts.csswg.org/css-fonts-5/#font-language-override
577#[syntax(" normal | <string> ")]
578#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
579#[style_value(
580 initial = "normal",
581 applies_to = "all elements and text",
582 inherited = "yes",
583 percentages = "n/a",
584 canonical_order = "per grammar",
585 animation_type = "discrete"
586)]
587#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
588#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-language-override"))]
589#[visit]
590pub enum FontLanguageOverrideStyleValue {}
591
592/// Represents the style value for `font-optical-sizing` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-optical-sizing).
593///
594/// The font-optical-sizing CSS property sets whether text rendering is optimized for viewing at different sizes.
595///
596/// The grammar is defined as:
597///
598/// ```text,ignore
599/// auto | none
600/// ```
601///
602// https://drafts.csswg.org/css-fonts-5/#font-optical-sizing
603#[syntax(" auto | none ")]
604#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
605#[style_value(
606 initial = "auto",
607 applies_to = "all elements and text",
608 inherited = "yes",
609 percentages = "n/a",
610 canonical_order = "per grammar",
611 animation_type = "discrete"
612)]
613#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
614#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-optical-sizing"))]
615#[visit]
616pub enum FontOpticalSizingStyleValue {}
617
618// /// Represents the style value for `font-variation-settings` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variation-settings).
619// ///
620// /// 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.
621// ///
622// /// The grammar is defined as:
623// ///
624// /// ```text,ignore
625// /// normal | [ <opentype-tag> <number> ]#
626// /// ```
627// ///
628// // https://drafts.csswg.org/css-fonts-5/#font-variation-settings
629// #[syntax(" normal | [ <opentype-tag> <number> ]# ")]
630// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
631// #[style_value(
632// initial = "normal",
633// applies_to = "all elements and text",
634// inherited = "yes",
635// percentages = "n/a",
636// canonical_order = "per grammar",
637// animation_type = "see prose",
638// )]
639// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
640// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variation-settings"))]
641// #[visit]
642// pub enum FontVariationSettingsStyleValue<'a> {}
643
644// /// Represents the style value for `font-palette` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-palette).
645// ///
646// /// The font-palette CSS property selects a color palette from the font, optionally overriding individual colors in the @font-palette-values at-rule.
647// ///
648// /// The grammar is defined as:
649// ///
650// /// ```text,ignore
651// /// normal | light | dark | <palette-identifier> | <palette-mix()>
652// /// ```
653// ///
654// // https://drafts.csswg.org/css-fonts-5/#font-palette
655// #[syntax(" normal | light | dark | <palette-identifier> | <palette-mix()> ")]
656// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
657// #[style_value(
658// initial = "normal",
659// applies_to = "all elements and text",
660// inherited = "yes",
661// percentages = "n/a",
662// canonical_order = "per grammar",
663// animation_type = "by computed value",
664// )]
665// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
666// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-palette"))]
667// #[visit]
668// pub enum FontPaletteStyleValue {}
669
670/// Represents the style value for `font-variant-emoji` as defined in [css-fonts-5](https://drafts.csswg.org/css-fonts-5/#font-variant-emoji).
671///
672/// The font-variant-emoji CSS property sets the default presentation for emoji characters.
673///
674/// The grammar is defined as:
675///
676/// ```text,ignore
677/// normal | text | emoji | unicode
678/// ```
679///
680// https://drafts.csswg.org/css-fonts-5/#font-variant-emoji
681#[syntax(" normal | text | emoji | unicode ")]
682#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
683#[style_value(
684 initial = "normal",
685 applies_to = "all elements and text",
686 inherited = "yes",
687 percentages = "n/a",
688 canonical_order = "per grammar",
689 animation_type = "discrete"
690)]
691#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
692#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.font-variant-emoji"))]
693#[visit]
694pub enum FontVariantEmojiStyleValue {}