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