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/ddbceaa3cee88f134d557c3051c26fcb5554a535
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;
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;
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;
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;
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 {}
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 {}
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;
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 {}
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 {}
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 {}
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 {}
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;
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//     Parse,
381//     Peek,
382//     ToSpan,
383//     ToCursors,
384//     DeclarationMetadata,
385//     SemanticEq,
386//     Debug,
387//     Clone,
388//     PartialEq,
389//     Eq,
390//     PartialOrd,
391//     Ord,
392//     Hash,
393// )]
394// #[declaration_metadata(
395//     initial = "medium",
396//     inherits,
397//     applies_to = Elements,
398//     animation_type = ByComputedValue,
399//     percentages = Unknown,
400//     property_group = Speech,
401//     computed_value_type = Unknown,
402//     canonical_order = "per grammar",
403// )]
404// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
405// #[cfg_attr(
406//     feature = "css_feature_data",
407//     derive(ToCSSFeature),
408//     css_feature("css.properties.voice-pitch")
409// )]
410// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
411// #[derive(csskit_derives::NodeWithMetadata)]
412// pub enum VoicePitchStyleValue {}
413
414// /// Represents the style value for `voice-range` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-range).
415// ///
416// /// The grammar is defined as:
417// ///
418// /// ```text,ignore
419// /**<frequency [0Hz,∞]> && absolute | [ [ x-low | low | medium | high | x-high ] ||
420// [ <frequency [0Hz,∞]> | <semitones> | <percentage> ] ]*/
421// /// ```
422// ///
423// /// https://drafts.csswg.org/css-speech-1/#voice-range
424// #[syntax(
425//     " <frequency [0Hz,∞]> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency [0Hz,∞]> | <semitones> | <percentage> ] ] "
426// )]
427// #[derive(
428//     Parse,
429//     Peek,
430//     ToSpan,
431//     ToCursors,
432//     DeclarationMetadata,
433//     SemanticEq,
434//     Debug,
435//     Clone,
436//     PartialEq,
437//     Eq,
438//     PartialOrd,
439//     Ord,
440//     Hash,
441// )]
442// #[declaration_metadata(
443//     initial = "medium",
444//     inherits,
445//     applies_to = Elements,
446//     animation_type = ByComputedValue,
447//     percentages = Unknown,
448//     property_group = Speech,
449//     computed_value_type = Unknown,
450//     canonical_order = "per grammar",
451// )]
452// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
453// #[cfg_attr(
454//     feature = "css_feature_data",
455//     derive(ToCSSFeature),
456//     css_feature("css.properties.voice-range")
457// )]
458// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
459// #[derive(csskit_derives::NodeWithMetadata)]
460// pub enum VoiceRangeStyleValue {}
461
462/// Represents the style value for `voice-rate` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-rate).
463///
464/// The grammar is defined as:
465///
466/// ```text,ignore
467/// [ normal | x-slow | slow | medium | fast | x-fast ] || <percentage [0,∞]>
468/// ```
469///
470/// https://drafts.csswg.org/css-speech-1/#voice-rate
471#[syntax(" [ normal | x-slow | slow | medium | fast | x-fast ] || <percentage [0,∞]> ")]
472#[derive(
473	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
474)]
475#[declaration_metadata(
476    initial = "normal",
477    inherits,
478    applies_to = Elements,
479    animation_type = ByComputedValue,
480    percentages = Unknown,
481    property_group = Speech,
482    computed_value_type = Unknown,
483    canonical_order = "per grammar",
484)]
485#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
486#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-rate"))]
487#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
488#[derive(csskit_derives::NodeWithMetadata)]
489pub enum VoiceRateStyleValue {}
490
491/// Represents the style value for `voice-stress` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-stress).
492///
493/// The grammar is defined as:
494///
495/// ```text,ignore
496/// normal | strong | moderate | none | reduced
497/// ```
498///
499/// https://drafts.csswg.org/css-speech-1/#voice-stress
500#[syntax(" normal | strong | moderate | none | reduced ")]
501#[derive(
502	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
503)]
504#[declaration_metadata(
505    initial = "normal",
506    inherits,
507    applies_to = Elements,
508    animation_type = Discrete,
509    property_group = Speech,
510    computed_value_type = AsSpecified,
511    canonical_order = "per grammar",
512)]
513#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
514#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-stress"))]
515#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
516#[derive(csskit_derives::NodeWithMetadata)]
517pub enum VoiceStressStyleValue {}
518
519/// Represents the style value for `voice-volume` as defined in [css-speech-1](https://drafts.csswg.org/css-speech-1/#voice-volume).
520///
521/// The grammar is defined as:
522///
523/// ```text,ignore
524/// silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ]
525/// ```
526///
527/// https://drafts.csswg.org/css-speech-1/#voice-volume
528#[syntax(" silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ] ")]
529#[derive(
530	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
531)]
532#[declaration_metadata(
533    initial = "medium",
534    inherits,
535    applies_to = Elements,
536    animation_type = ByComputedValue,
537    property_group = Speech,
538    computed_value_type = Unknown,
539    canonical_order = "per grammar",
540)]
541#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
542#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.voice-volume"))]
543#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
544#[derive(csskit_derives::NodeWithMetadata)]
545pub enum VoiceVolumeStyleValue {}