css_ast/values/speech/
mod.rs

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