Skip to main content

css_ast/values/speech/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/27fd597de31a8c43234f99f58983e4af3d1f9282
3// Do not edit this file directly.
4#![allow(warnings)]
5//! https://drafts.csswg.org/css-speech-1/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `cue` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#cue).
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// <'cue-before'> <'cue-after'>?
16/// ```
17///
18/// https://drafts.csswg.org/css-speech-1/#cue
19#[syntax(" <'cue-before'> <'cue-after'>? ")]
20#[derive(
21	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
22)]
23#[declaration_metadata(
24    initial = "see individual properties",
25    applies_to = Elements,
26    animation_type = Unknown,
27    property_group = Speech,
28    computed_value_type = Unknown,
29    canonical_order = "per grammar",
30)]
31#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
32#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.cue"))]
33#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
34#[derive(csskit_derives::NodeWithMetadata)]
35pub struct CueStyleValue<'a>;
36
37/// Represents the style value for `cue-after` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#cue-after).
38///
39/// The grammar is defined as:
40///
41/// ```text,ignore
42/// <url> <decibel>? | none
43/// ```
44///
45/// https://drafts.csswg.org/css-speech-1/#cue-after
46#[syntax(" <url> <decibel>? | none ")]
47#[derive(
48	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
49)]
50#[declaration_metadata(
51    initial = "none",
52    applies_to = Elements,
53    animation_type = ByComputedValue,
54    property_group = Speech,
55    computed_value_type = AsSpecified,
56    canonical_order = "per grammar",
57)]
58#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
59#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.cue-after"))]
60#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
61#[derive(csskit_derives::NodeWithMetadata)]
62pub struct CueAfterStyleValue<'a>;
63
64/// Represents the style value for `cue-before` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#cue-before).
65///
66/// The grammar is defined as:
67///
68/// ```text,ignore
69/// <url> <decibel>? | none
70/// ```
71///
72/// https://drafts.csswg.org/css-speech-1/#cue-before
73#[syntax(" <url> <decibel>? | none ")]
74#[derive(
75	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
76)]
77#[declaration_metadata(
78    initial = "none",
79    applies_to = Elements,
80    animation_type = ByComputedValue,
81    property_group = Speech,
82    computed_value_type = AsSpecified,
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.cue-before"))]
87#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
88#[derive(csskit_derives::NodeWithMetadata)]
89pub struct CueBeforeStyleValue<'a>;
90
91/// Represents the style value for `pause` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#pause).
92///
93/// The grammar is defined as:
94///
95/// ```text,ignore
96/// <'pause-before'> <'pause-after'>?
97/// ```
98///
99/// https://drafts.csswg.org/css-speech-1/#pause
100#[syntax(" <'pause-before'> <'pause-after'>? ")]
101#[derive(
102	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
103)]
104#[declaration_metadata(
105    initial = "see individual properties",
106    applies_to = Elements,
107    animation_type = Unknown,
108    property_group = Speech,
109    computed_value_type = Unknown,
110    canonical_order = "per grammar",
111)]
112#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
113#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.pause"))]
114#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
115#[derive(csskit_derives::NodeWithMetadata)]
116pub struct PauseStyleValue<'a>;
117
118/// Represents the style value for `pause-after` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#pause-after).
119///
120/// The grammar is defined as:
121///
122/// ```text,ignore
123/// <time [0s,∞]> | none | x-weak | weak | medium | strong | x-strong
124/// ```
125///
126/// https://drafts.csswg.org/css-speech-1/#pause-after
127#[syntax(" <time [0s,∞]> | none | x-weak | weak | medium | strong | x-strong ")]
128#[derive(
129	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
130)]
131#[declaration_metadata(
132    initial = "none",
133    applies_to = Elements,
134    animation_type = ByComputedValue,
135    property_group = Speech,
136    computed_value_type = AsSpecified,
137    canonical_order = "per grammar",
138)]
139#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
140#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.pause-after"))]
141#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
142#[derive(csskit_derives::NodeWithMetadata)]
143pub enum PauseAfterStyleValue<'a> {}
144
145/// Represents the style value for `pause-before` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#pause-before).
146///
147/// The grammar is defined as:
148///
149/// ```text,ignore
150/// <time [0s,∞]> | none | x-weak | weak | medium | strong | x-strong
151/// ```
152///
153/// https://drafts.csswg.org/css-speech-1/#pause-before
154#[syntax(" <time [0s,∞]> | none | x-weak | weak | medium | strong | x-strong ")]
155#[derive(
156	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
157)]
158#[declaration_metadata(
159    initial = "none",
160    applies_to = Elements,
161    animation_type = ByComputedValue,
162    property_group = Speech,
163    computed_value_type = AsSpecified,
164    canonical_order = "per grammar",
165)]
166#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
167#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.pause-before"))]
168#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
169#[derive(csskit_derives::NodeWithMetadata)]
170pub enum PauseBeforeStyleValue<'a> {}
171
172/// Represents the style value for `rest` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#rest).
173///
174/// The grammar is defined as:
175///
176/// ```text,ignore
177/// <'rest-before'> <'rest-after'>?
178/// ```
179///
180/// https://drafts.csswg.org/css-speech-1/#rest
181#[syntax(" <'rest-before'> <'rest-after'>? ")]
182#[derive(
183	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
184)]
185#[declaration_metadata(
186    initial = "see individual properties",
187    applies_to = Elements,
188    animation_type = Unknown,
189    property_group = Speech,
190    computed_value_type = Unknown,
191    canonical_order = "per grammar",
192)]
193#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
194#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.rest"))]
195#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
196#[derive(csskit_derives::NodeWithMetadata)]
197pub struct RestStyleValue<'a>;
198
199/// Represents the style value for `rest-after` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#rest-after).
200///
201/// The grammar is defined as:
202///
203/// ```text,ignore
204/// <time [0s,∞]> | none | x-weak | weak | medium | strong | x-strong
205/// ```
206///
207/// https://drafts.csswg.org/css-speech-1/#rest-after
208#[syntax(" <time [0s,∞]> | none | x-weak | weak | medium | strong | x-strong ")]
209#[derive(
210	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
211)]
212#[declaration_metadata(
213    initial = "none",
214    applies_to = Elements,
215    animation_type = ByComputedValue,
216    property_group = Speech,
217    computed_value_type = AsSpecified,
218    canonical_order = "per grammar",
219)]
220#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
221#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.rest-after"))]
222#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
223#[derive(csskit_derives::NodeWithMetadata)]
224pub enum RestAfterStyleValue<'a> {}
225
226/// Represents the style value for `rest-before` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#rest-before).
227///
228/// The grammar is defined as:
229///
230/// ```text,ignore
231/// <time [0s,∞]> | none | x-weak | weak | medium | strong | x-strong
232/// ```
233///
234/// https://drafts.csswg.org/css-speech-1/#rest-before
235#[syntax(" <time [0s,∞]> | none | x-weak | weak | medium | strong | x-strong ")]
236#[derive(
237	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
238)]
239#[declaration_metadata(
240    initial = "none",
241    applies_to = Elements,
242    animation_type = ByComputedValue,
243    property_group = Speech,
244    computed_value_type = AsSpecified,
245    canonical_order = "per grammar",
246)]
247#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
248#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.rest-before"))]
249#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
250#[derive(csskit_derives::NodeWithMetadata)]
251pub enum RestBeforeStyleValue<'a> {}
252
253/// Represents the style value for `speak` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#speak).
254///
255/// The speak CSS property sets whether or not text should be spoken.
256///
257/// The grammar is defined as:
258///
259/// ```text,ignore
260/// auto | never | always
261/// ```
262///
263/// https://drafts.csswg.org/css-speech-1/#speak
264#[syntax(" auto | never | always ")]
265#[derive(
266	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
267)]
268#[declaration_metadata(
269    initial = "auto",
270    inherits,
271    applies_to = Elements,
272    animation_type = Discrete,
273    property_group = Speech,
274    computed_value_type = AsSpecified,
275    canonical_order = "per grammar",
276)]
277#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
278#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.speak"))]
279#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
280#[derive(csskit_derives::NodeWithMetadata)]
281pub enum SpeakStyleValue<'a> {}
282
283/// Represents the style value for `voice-balance` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-balance).
284///
285/// The grammar is defined as:
286///
287/// ```text,ignore
288/// <number> | left | center | right | leftwards | rightwards
289/// ```
290///
291/// https://drafts.csswg.org/css-speech-1/#voice-balance
292#[syntax(" <number> | left | center | right | leftwards | rightwards ")]
293#[derive(
294	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
295)]
296#[declaration_metadata(
297    initial = "center",
298    inherits,
299    applies_to = Elements,
300    animation_type = ByComputedValue,
301    property_group = Speech,
302    computed_value_type = Unknown,
303    canonical_order = "per grammar",
304)]
305#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
306#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-balance"))]
307#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
308#[derive(csskit_derives::NodeWithMetadata)]
309pub enum VoiceBalanceStyleValue<'a> {}
310
311/// Represents the style value for `voice-duration` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-duration).
312///
313/// The grammar is defined as:
314///
315/// ```text,ignore
316/// auto | <time [0s,∞]>
317/// ```
318///
319/// https://drafts.csswg.org/css-speech-1/#voice-duration
320#[syntax(" auto | <time [0s,∞]> ")]
321#[derive(
322	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
323)]
324#[declaration_metadata(
325    initial = "auto",
326    applies_to = Elements,
327    animation_type = ByComputedValue,
328    property_group = Speech,
329    computed_value_type = AsSpecified,
330    canonical_order = "per grammar",
331)]
332#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
333#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-duration"))]
334#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
335#[derive(csskit_derives::NodeWithMetadata)]
336pub struct VoiceDurationStyleValue<'a>;
337
338/// Represents the style value for `voice-family` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-family).
339///
340/// The grammar is defined as:
341///
342/// ```text,ignore
343/// [ <voice-family-name> | <generic-voice> ]# | preserve
344/// ```
345///
346/// https://drafts.csswg.org/css-speech-1/#voice-family
347#[syntax(" [ <voice-family-name> | <generic-voice> ]# | preserve ")]
348#[derive(
349	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
350)]
351#[declaration_metadata(
352    initial = "implementation-dependent",
353    inherits,
354    applies_to = Elements,
355    animation_type = Discrete,
356    property_group = Speech,
357    computed_value_type = AsSpecified,
358    canonical_order = "per grammar",
359)]
360#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
361#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-family"))]
362#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
363#[derive(csskit_derives::NodeWithMetadata)]
364pub enum VoiceFamilyStyleValue<'a> {}
365
366/// Represents the style value for `voice-pitch` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-pitch).
367///
368/// The grammar is defined as:
369///
370/// ```text,ignore
371/**<frequency [0Hz,∞]> && absolute | [ [ x-low | low | medium | high | x-high ] ||
372[ <frequency [0Hz,∞]> | <semitones> | <percentage> ] ]*/
373/// ```
374///
375/// https://drafts.csswg.org/css-speech-1/#voice-pitch
376#[syntax(
377	" <frequency [0Hz,∞]> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency [0Hz,∞]> | <semitones> | <percentage> ] ] "
378)]
379#[derive(
380	Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
381)]
382#[declaration_metadata(
383    initial = "medium",
384    inherits,
385    applies_to = Elements,
386    animation_type = ByComputedValue,
387    percentages = Unknown,
388    property_group = Speech,
389    computed_value_type = Unknown,
390    canonical_order = "per grammar",
391)]
392#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
393#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-pitch"))]
394#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
395#[derive(csskit_derives::NodeWithMetadata)]
396pub enum VoicePitchStyleValue<'a> {}
397
398/// Represents the style value for `voice-range` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-range).
399///
400/// The grammar is defined as:
401///
402/// ```text,ignore
403/**<frequency [0Hz,∞]> && absolute | [ [ x-low | low | medium | high | x-high ] ||
404[ <frequency [0Hz,∞]> | <semitones> | <percentage> ] ]*/
405/// ```
406///
407/// https://drafts.csswg.org/css-speech-1/#voice-range
408#[syntax(
409	" <frequency [0Hz,∞]> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency [0Hz,∞]> | <semitones> | <percentage> ] ] "
410)]
411#[derive(
412	Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
413)]
414#[declaration_metadata(
415    initial = "medium",
416    inherits,
417    applies_to = Elements,
418    animation_type = ByComputedValue,
419    percentages = Unknown,
420    property_group = Speech,
421    computed_value_type = Unknown,
422    canonical_order = "per grammar",
423)]
424#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
425#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-range"))]
426#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
427#[derive(csskit_derives::NodeWithMetadata)]
428pub enum VoiceRangeStyleValue<'a> {}
429
430/// Represents the style value for `voice-rate` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-rate).
431///
432/// The grammar is defined as:
433///
434/// ```text,ignore
435/// [ normal | x-slow | slow | medium | fast | x-fast ] || <percentage [0,∞]>
436/// ```
437///
438/// https://drafts.csswg.org/css-speech-1/#voice-rate
439#[syntax(" [ normal | x-slow | slow | medium | fast | x-fast ] || <percentage [0,∞]> ")]
440#[derive(
441	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
442)]
443#[declaration_metadata(
444    initial = "normal",
445    inherits,
446    applies_to = Elements,
447    animation_type = ByComputedValue,
448    percentages = Unknown,
449    property_group = Speech,
450    computed_value_type = Unknown,
451    canonical_order = "per grammar",
452)]
453#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
454#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-rate"))]
455#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
456#[derive(csskit_derives::NodeWithMetadata)]
457pub enum VoiceRateStyleValue<'a> {}
458
459/// Represents the style value for `voice-stress` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-stress).
460///
461/// The grammar is defined as:
462///
463/// ```text,ignore
464/// normal | strong | moderate | none | reduced
465/// ```
466///
467/// https://drafts.csswg.org/css-speech-1/#voice-stress
468#[syntax(" normal | strong | moderate | none | reduced ")]
469#[derive(
470	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
471)]
472#[declaration_metadata(
473    initial = "normal",
474    inherits,
475    applies_to = Elements,
476    animation_type = Discrete,
477    property_group = Speech,
478    computed_value_type = AsSpecified,
479    canonical_order = "per grammar",
480)]
481#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
482#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-stress"))]
483#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
484#[derive(csskit_derives::NodeWithMetadata)]
485pub enum VoiceStressStyleValue<'a> {}
486
487/// Represents the style value for `voice-volume` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-volume).
488///
489/// The grammar is defined as:
490///
491/// ```text,ignore
492/// silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ]
493/// ```
494///
495/// https://drafts.csswg.org/css-speech-1/#voice-volume
496#[syntax(" silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ] ")]
497#[derive(
498	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
499)]
500#[declaration_metadata(
501    initial = "medium",
502    inherits,
503    applies_to = Elements,
504    animation_type = ByComputedValue,
505    property_group = Speech,
506    computed_value_type = Unknown,
507    canonical_order = "per grammar",
508)]
509#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
510#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-volume"))]
511#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
512#[derive(csskit_derives::NodeWithMetadata)]
513pub enum VoiceVolumeStyleValue<'a> {}