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