css_ast/values/text_decor/
mod.rs

1#![allow(warnings)]
2//! CSS Text Decoration Module Level 4
3//! https://drafts.csswg.org/css-text-decor-4/
4
5mod impls;
6use impls::*;
7
8// /// Represents the style value for `text-decoration-line` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-line).
9// ///
10// /// The text-decoration CSS property sets the style and color of decorative lines including underline, overline, line-through, or a combination of lines.
11// ///
12// /// The grammar is defined as:
13// ///
14// /// ```text,ignore
15// /// none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error
16// /// ```
17// ///
18// // https://drafts.csswg.org/css-text-decor-4/#text-decoration-line
19// #[syntax(" none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error ")]
20// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21// #[style_value(
22// 	initial = "none",
23//   applies_to = "all elements",
24// 	inherited = "no (but see prose, above)",
25// 	percentages = "n/a",
26// 	canonical_order = "per grammar",
27// 	animation_type = "discrete",
28// )]
29// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-line"))]
31// #[visit]
32// pub enum TextDecorationLineStyleValue {}
33
34/// Represents the style value for `text-decoration-style` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-style).
35///
36/// The text-decoration CSS property sets the style and color of decorative lines including underline, overline, line-through, or a combination of lines.
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// solid | double | dotted | dashed | wavy
42/// ```
43///
44// https://drafts.csswg.org/css-text-decor-4/#text-decoration-style
45#[syntax(" solid | double | dotted | dashed | wavy ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48	initial = "solid",
49	applies_to = "all elements",
50	inherited = "no",
51	percentages = "n/a",
52	canonical_order = "per grammar",
53	animation_type = "discrete"
54)]
55#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
56#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-style"))]
57#[visit]
58pub enum TextDecorationStyleStyleValue {}
59
60/// Represents the style value for `text-decoration-color` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-color).
61///
62/// The text-decoration CSS property sets the style and color of decorative lines including underline, overline, line-through, or a combination of lines.
63///
64/// The grammar is defined as:
65///
66/// ```text,ignore
67/// <color>
68/// ```
69///
70// https://drafts.csswg.org/css-text-decor-4/#text-decoration-color
71#[syntax(" <color> ")]
72#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
73#[style_value(
74	initial = "currentcolor",
75	applies_to = "all elements",
76	inherited = "no",
77	percentages = "n/a",
78	canonical_order = "per grammar",
79	animation_type = "by computed value type"
80)]
81#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
82#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-color"))]
83#[visit]
84pub struct TextDecorationColorStyleValue;
85
86// /// Represents the style value for `text-decoration` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration).
87// ///
88// /// The text-decoration CSS property sets the style and color of decorative lines including underline, overline, line-through, or a combination of lines.
89// ///
90// /// The grammar is defined as:
91// ///
92// /// ```text,ignore
93// /// <'text-decoration-line'> || <'text-decoration-thickness'> || <'text-decoration-style'> || <'text-decoration-color'>
94// /// ```
95// ///
96// // https://drafts.csswg.org/css-text-decor-4/#text-decoration
97// #[syntax(
98// 	" <'text-decoration-line'> || <'text-decoration-thickness'> || <'text-decoration-style'> || <'text-decoration-color'> "
99// )]
100// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
101// #[style_value(
102// 	initial = "see individual properties",
103//   applies_to = "see individual properties",
104// 	inherited = "see individual properties",
105// 	percentages = "see individual properties",
106// 	canonical_order = "per grammar",
107// 	animation_type = "see individual properties",
108// )]
109// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
110// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration"))]
111// #[visit]
112// pub struct TextDecorationStyleValue;
113
114// /// Represents the style value for `text-underline-position` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-underline-position).
115// ///
116// /// The text-underline-position CSS property sets the position of underlines on text. For example, text-underline-position: under places the underline below the text, avoiding crossing descenders. The underline may be further adjusted by the text-underline-offset property.
117// ///
118// /// The grammar is defined as:
119// ///
120// /// ```text,ignore
121// /// auto | [ from-font | under ] || [ left | right ]
122// /// ```
123// ///
124// // https://drafts.csswg.org/css-text-decor-4/#text-underline-position
125// #[syntax(" auto | [ from-font | under ] || [ left | right ] ")]
126// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
127// #[style_value(
128// 	initial = "auto",
129//   applies_to = "all elements",
130// 	inherited = "yes",
131// 	percentages = "n/a",
132// 	canonical_order = "per grammar",
133// 	animation_type = "discrete",
134// )]
135// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
136// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-underline-position"))]
137// #[visit]
138// pub enum TextUnderlinePositionStyleValue {}
139
140// /// Represents the style value for `text-emphasis-style` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-emphasis-style).
141// ///
142// /// The text-emphasis CSS property sets position and style for text emphasis marks, especially for East Asian languages.
143// ///
144// /// The grammar is defined as:
145// ///
146// /// ```text,ignore
147// /// none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>
148// /// ```
149// ///
150// // https://drafts.csswg.org/css-text-decor-4/#text-emphasis-style
151// #[syntax(" none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string> ")]
152// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
153// #[style_value(
154// 	initial = "none",
155//   applies_to = "text",
156// 	inherited = "yes",
157// 	percentages = "n/a",
158// 	canonical_order = "per grammar",
159// 	animation_type = "discrete",
160// )]
161// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
162// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-emphasis-style"))]
163// #[visit]
164// pub enum TextEmphasisStyleStyleValue {}
165
166/// Represents the style value for `text-emphasis-color` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-emphasis-color).
167///
168/// The text-emphasis CSS property sets position and style for text emphasis marks, especially for East Asian languages.
169///
170/// The grammar is defined as:
171///
172/// ```text,ignore
173/// <color>
174/// ```
175///
176// https://drafts.csswg.org/css-text-decor-4/#text-emphasis-color
177#[syntax(" <color> ")]
178#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
179#[style_value(
180	initial = "currentcolor",
181	applies_to = "text",
182	inherited = "yes",
183	percentages = "n/a",
184	canonical_order = "per grammar",
185	animation_type = "by computed value type"
186)]
187#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
188#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-emphasis-color"))]
189#[visit]
190pub struct TextEmphasisColorStyleValue;
191
192// /// Represents the style value for `text-emphasis` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-emphasis).
193// ///
194// /// The text-emphasis CSS property sets position and style for text emphasis marks, especially for East Asian languages.
195// ///
196// /// The grammar is defined as:
197// ///
198// /// ```text,ignore
199// /// <'text-emphasis-style'> || <'text-emphasis-color'>
200// /// ```
201// ///
202// // https://drafts.csswg.org/css-text-decor-4/#text-emphasis
203// #[syntax(" <'text-emphasis-style'> || <'text-emphasis-color'> ")]
204// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
205// #[style_value(
206// 	initial = "see individual properties",
207//   applies_to = "see individual properties",
208// 	inherited = "see individual properties",
209// 	percentages = "see individual properties",
210// 	canonical_order = "per grammar",
211// 	animation_type = "see individual properties",
212// )]
213// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
214// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-emphasis"))]
215// #[visit]
216// pub struct TextEmphasisStyleValue;
217
218// /// Represents the style value for `text-emphasis-position` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-emphasis-position).
219// ///
220// /// The text-emphasis CSS property sets position and style for text emphasis marks, especially for East Asian languages.
221// ///
222// /// The grammar is defined as:
223// ///
224// /// ```text,ignore
225// /// [ over | under ] && [ right | left ]?
226// /// ```
227// ///
228// // https://drafts.csswg.org/css-text-decor-4/#text-emphasis-position
229// #[syntax(" [ over | under ] && [ right | left ]? ")]
230// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
231// #[style_value(
232// 	initial = "over right",
233//   applies_to = "text",
234// 	inherited = "yes",
235// 	percentages = "n/a",
236// 	canonical_order = "per grammar",
237// 	animation_type = "discrete",
238// )]
239// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
240// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-emphasis-position"))]
241// #[visit]
242// pub struct TextEmphasisPositionStyleValue;
243
244/// Represents the style value for `text-shadow` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-shadow).
245///
246/// The text-shadow CSS property sets the position and styles of shadow on text.
247///
248/// The grammar is defined as:
249///
250/// ```text,ignore
251/// none | <shadow>#
252/// ```
253///
254// https://drafts.csswg.org/css-text-decor-4/#text-shadow
255#[syntax(" none | <shadow># ")]
256#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
257#[style_value(
258	initial = "none",
259	applies_to = "text",
260	inherited = "yes",
261	percentages = "n/a",
262	canonical_order = "per grammar",
263	animation_type = "as shadow list"
264)]
265#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
266#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-shadow"))]
267#[visit]
268pub struct TextShadowStyleValue<'a>;
269
270/// Represents the style value for `text-decoration-thickness` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-thickness).
271///
272/// The text-decoration CSS property sets the style and color of decorative lines including underline, overline, line-through, or a combination of lines.
273///
274/// The grammar is defined as:
275///
276/// ```text,ignore
277/// auto | from-font | <length-percentage>
278/// ```
279///
280// https://drafts.csswg.org/css-text-decor-4/#text-decoration-thickness
281#[syntax(" auto | from-font | <length-percentage> ")]
282#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
283#[style_value(
284	initial = "auto",
285	applies_to = "all elements",
286	inherited = "no",
287	percentages = "n/a",
288	canonical_order = "per grammar",
289	animation_type = "by computed value"
290)]
291#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
292#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-thickness"))]
293#[visit]
294pub enum TextDecorationThicknessStyleValue {}
295
296/// Represents the style value for `text-underline-offset` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-underline-offset).
297///
298/// The text-underline-offset CSS property shifts underlines on text from the initial position by a given distance. The initial position is affected by the text-underline-position property.
299///
300/// The grammar is defined as:
301///
302/// ```text,ignore
303/// auto | <length-percentage>
304/// ```
305///
306// https://drafts.csswg.org/css-text-decor-4/#text-underline-offset
307#[syntax(" auto | <length-percentage> ")]
308#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
309#[style_value(
310	initial = "auto",
311	applies_to = "all elements",
312	inherited = "yes",
313	percentages = "n/a",
314	canonical_order = "per grammar",
315	animation_type = "by computed value"
316)]
317#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
318#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-underline-offset"))]
319#[visit]
320pub struct TextUnderlineOffsetStyleValue;
321
322/// Represents the style value for `text-decoration-trim` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-trim).
323///
324/// The grammar is defined as:
325///
326/// ```text,ignore
327/// <length>{1,2} | auto
328/// ```
329///
330// https://drafts.csswg.org/css-text-decor-4/#text-decoration-trim
331#[syntax(" <length>{1,2} | auto ")]
332#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
333#[style_value(
334	initial = "0",
335	applies_to = "all elements",
336	inherited = "no",
337	percentages = "n/a",
338	canonical_order = "per grammar",
339	animation_type = "by computed value"
340)]
341#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
342#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-trim"))]
343#[visit]
344pub struct TextDecorationTrimStyleValue;
345
346/// Represents the style value for `text-decoration-skip` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip).
347///
348/// The text-decoration CSS property sets the style and color of decorative lines including underline, overline, line-through, or a combination of lines.
349///
350/// The grammar is defined as:
351///
352/// ```text,ignore
353/// none | auto
354/// ```
355///
356// https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip
357#[syntax(" none | auto ")]
358#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
359#[style_value(
360	initial = "See individual properties",
361	applies_to = "all elements",
362	inherited = "yes",
363	percentages = "n/a",
364	canonical_order = "per grammar",
365	animation_type = "discrete"
366)]
367#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
368#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-skip"))]
369#[visit]
370pub enum TextDecorationSkipStyleValue {}
371
372// /// Represents the style value for `text-decoration-skip-self` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-self).
373// ///
374// /// The grammar is defined as:
375// ///
376// /// ```text,ignore
377// /// auto | skip-all | [ skip-underline || skip-overline || skip-line-through ] | no-skip
378// /// ```
379// ///
380// // https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-self
381// #[syntax(" auto | skip-all | [ skip-underline || skip-overline || skip-line-through ] | no-skip ")]
382// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
383// #[style_value(
384// 	initial = "auto",
385//   applies_to = "all elements",
386// 	inherited = "no",
387// 	percentages = "n/a",
388// 	canonical_order = "per grammar",
389// 	animation_type = "discrete",
390// )]
391// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
392// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-skip-self"))]
393// #[visit]
394// pub enum TextDecorationSkipSelfStyleValue {}
395
396/// Represents the style value for `text-decoration-skip-box` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-box).
397///
398/// The grammar is defined as:
399///
400/// ```text,ignore
401/// none | all
402/// ```
403///
404// https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-box
405#[syntax(" none | all ")]
406#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
407#[style_value(
408	initial = "none",
409	applies_to = "all elements",
410	inherited = "yes",
411	percentages = "n/a",
412	canonical_order = "per grammar",
413	animation_type = "discrete"
414)]
415#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
416#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-skip-box"))]
417#[visit]
418pub enum TextDecorationSkipBoxStyleValue {}
419
420// /// Represents the style value for `text-decoration-skip-spaces` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-spaces).
421// ///
422// /// The grammar is defined as:
423// ///
424// /// ```text,ignore
425// /// none | all | [ start || end ]
426// /// ```
427// ///
428// // https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-spaces
429// #[syntax(" none | all | [ start || end ] ")]
430// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
431// #[style_value(
432// 	initial = "start end",
433//   applies_to = "all elements",
434// 	inherited = "yes",
435// 	percentages = "n/a",
436// 	canonical_order = "per grammar",
437// 	animation_type = "discrete",
438// )]
439// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
440// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-skip-spaces"))]
441// #[visit]
442// pub enum TextDecorationSkipSpacesStyleValue {}
443
444/// Represents the style value for `text-decoration-skip-ink` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink).
445///
446/// The text-decoration CSS property sets the style and color of decorative lines including underline, overline, line-through, or a combination of lines.
447///
448/// The grammar is defined as:
449///
450/// ```text,ignore
451/// auto | none | all
452/// ```
453///
454// https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink
455#[syntax(" auto | none | all ")]
456#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
457#[style_value(
458	initial = "auto",
459	applies_to = "all elements",
460	inherited = "yes",
461	percentages = "n/a",
462	canonical_order = "per grammar",
463	animation_type = "discrete"
464)]
465#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
466#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-decoration-skip-ink"))]
467#[visit]
468pub enum TextDecorationSkipInkStyleValue {}
469
470/// Represents the style value for `text-emphasis-skip` as defined in [css-text-decor-4](https://drafts.csswg.org/css-text-decor-4/#text-emphasis-skip).
471///
472/// The grammar is defined as:
473///
474/// ```text,ignore
475/// spaces || punctuation || symbols || narrow
476/// ```
477///
478// https://drafts.csswg.org/css-text-decor-4/#text-emphasis-skip
479#[syntax(" spaces || punctuation || symbols || narrow ")]
480#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
481#[style_value(
482	initial = "spaces punctuation",
483	applies_to = "text",
484	inherited = "yes",
485	percentages = "n/a",
486	canonical_order = "per grammar",
487	animation_type = "discrete"
488)]
489#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
490#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-emphasis-skip"))]
491#[visit]
492pub struct TextEmphasisSkipStyleValue;