css_ast/values/text/mod.rs
1#![allow(warnings)]
2//! CSS Text Module Level 4
3//! https://drafts.csswg.org/css-text-4/
4
5mod impls;
6use impls::*;
7
8// /// Represents the style value for `text-transform` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-transform).
9// ///
10// /// The text-transform CSS property sets text case and capitalization.
11// ///
12// /// The grammar is defined as:
13// ///
14// /// ```text,ignore
15// /// none | [capitalize | uppercase | lowercase ] || full-width || full-size-kana | math-auto
16// /// ```
17// ///
18// // https://drafts.csswg.org/css-text-4/#text-transform
19// #[syntax(" none | [capitalize | uppercase | lowercase ] || full-width || full-size-kana | math-auto ")]
20// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21// #[style_value(
22// initial = "none",
23// applies_to = "text",
24// inherited = "yes",
25// percentages = "n/a",
26// canonical_order = "n/a",
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-transform"))]
31// #[visit]
32// pub enum TextTransformStyleValue {}
33
34// /// Represents the style value for `white-space` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#white-space).
35// ///
36// /// The white-space CSS property sets how white space is collapsed and how lines wrap. It is a shorthand for white-space-collapse and text-wrap-mode.
37// ///
38// /// The grammar is defined as:
39// ///
40// /// ```text,ignore
41// /// normal | pre | pre-wrap | pre-line | <'white-space-collapse'> || <'text-wrap-mode'> || <'white-space-trim'>
42// /// ```
43// ///
44// // https://drafts.csswg.org/css-text-4/#white-space
45// #[syntax(
46// " normal | pre | pre-wrap | pre-line | <'white-space-collapse'> || <'text-wrap-mode'> || <'white-space-trim'> "
47// )]
48// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
49// #[style_value(
50// initial = "normal",
51// applies_to = "text",
52// inherited = "see individual properties",
53// percentages = "n/a",
54// canonical_order = "n/a",
55// animation_type = "discrete",
56// )]
57// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
58// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.white-space"))]
59// #[visit]
60// pub enum WhiteSpaceStyleValue {}
61
62/// Represents the style value for `tab-size` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#tab-size).
63///
64/// The tab-size CSS property sets the width of the tab character.
65///
66/// The grammar is defined as:
67///
68/// ```text,ignore
69/// <number [0,∞]> | <length [0,∞]>
70/// ```
71///
72// https://drafts.csswg.org/css-text-4/#tab-size
73#[syntax(" <number [0,∞]> | <length [0,∞]> ")]
74#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
75#[style_value(
76 initial = "8",
77 applies_to = "text",
78 inherited = "yes",
79 percentages = "n/a",
80 canonical_order = "n/a",
81 animation_type = "by computed value type"
82)]
83#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
84#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.tab-size"))]
85#[visit]
86pub struct TabSizeStyleValue;
87
88/// Represents the style value for `word-break` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#word-break).
89///
90/// The word-break CSS property sets how lines break within words.
91///
92/// The grammar is defined as:
93///
94/// ```text,ignore
95/// normal | break-all | keep-all | manual | auto-phrase | break-word
96/// ```
97///
98// https://drafts.csswg.org/css-text-4/#word-break
99#[syntax(" normal | break-all | keep-all | manual | auto-phrase | break-word ")]
100#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
101#[style_value(
102 initial = "normal",
103 applies_to = "text",
104 inherited = "yes",
105 percentages = "n/a",
106 canonical_order = "n/a",
107 animation_type = "discrete"
108)]
109#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
110#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.word-break"))]
111#[visit]
112pub enum WordBreakStyleValue {}
113
114/// Represents the style value for `line-break` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#line-break).
115///
116/// The line-break CSS property sets how strictly to apply rules for wrapping text to new lines, especially for symbols and punctuation.
117///
118/// The grammar is defined as:
119///
120/// ```text,ignore
121/// auto | loose | normal | strict | anywhere
122/// ```
123///
124// https://drafts.csswg.org/css-text-4/#line-break
125#[syntax(" auto | loose | normal | strict | anywhere ")]
126#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
127#[style_value(
128 initial = "auto",
129 applies_to = "text",
130 inherited = "yes",
131 percentages = "n/a",
132 canonical_order = "n/a",
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.line-break"))]
137#[visit]
138pub enum LineBreakStyleValue {}
139
140/// Represents the style value for `hyphens` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#hyphens).
141///
142/// The hyphens CSS property controls when long words are broken by line wrapping. Although called hyphens, the property applies to word-splitting behavior across languages, such as customary spelling changes or the use of other characters. Support for non-English languages varies significantly.
143///
144/// The grammar is defined as:
145///
146/// ```text,ignore
147/// none | manual | auto
148/// ```
149///
150// https://drafts.csswg.org/css-text-4/#hyphens
151#[syntax(" none | manual | auto ")]
152#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
153#[style_value(
154 initial = "manual",
155 applies_to = "text",
156 inherited = "yes",
157 percentages = "n/a",
158 canonical_order = "n/a",
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.hyphens"))]
163#[visit]
164pub enum HyphensStyleValue {}
165
166/// Represents the style value for `overflow-wrap` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#overflow-wrap).
167///
168/// The overflow-wrap CSS property breaks a line of text onto multiple lines inside the targeted element in an otherwise unbreakable place to prevent overflow. The legacy property is word-wrap.
169///
170/// The grammar is defined as:
171///
172/// ```text,ignore
173/// normal | break-word | anywhere
174/// ```
175///
176// https://drafts.csswg.org/css-text-4/#overflow-wrap
177#[syntax(" normal | break-word | anywhere ")]
178#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
179#[style_value(
180 initial = "normal",
181 applies_to = "text",
182 inherited = "yes",
183 percentages = "n/a",
184 canonical_order = "n/a",
185 animation_type = "discrete"
186)]
187#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
188#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.overflow-wrap"))]
189#[visit]
190pub enum OverflowWrapStyleValue {}
191
192/// Represents the style value for `word-wrap` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#word-wrap).
193///
194/// The grammar is defined as:
195///
196/// ```text,ignore
197/// normal | break-word | anywhere
198/// ```
199///
200// https://drafts.csswg.org/css-text-4/#word-wrap
201#[syntax(" normal | break-word | anywhere ")]
202#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
203#[style_value(
204 initial = "normal",
205 applies_to = "text",
206 inherited = "yes",
207 percentages = "n/a",
208 canonical_order = "n/a",
209 animation_type = "discrete"
210)]
211#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
212#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.word-wrap"))]
213#[visit]
214pub enum WordWrapStyleValue {}
215
216/// Represents the style value for `text-align` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-align).
217///
218/// The text-align CSS property sets the horizontal placement of the inner content of a block element.
219///
220/// The grammar is defined as:
221///
222/// ```text,ignore
223/// start | end | left | right | center | <string> | justify | match-parent | justify-all
224/// ```
225///
226// https://drafts.csswg.org/css-text-4/#text-align
227#[syntax(" start | end | left | right | center | <string> | justify | match-parent | justify-all ")]
228#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
229#[style_value(
230 initial = "start",
231 applies_to = "block containers",
232 inherited = "yes",
233 percentages = "see individual properties",
234 canonical_order = "n/a",
235 animation_type = "discrete"
236)]
237#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
238#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-align"))]
239#[visit]
240pub enum TextAlignStyleValue {}
241
242/// Represents the style value for `text-align-all` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-align-all).
243///
244/// The grammar is defined as:
245///
246/// ```text,ignore
247/// start | end | left | right | center | <string> | justify | match-parent
248/// ```
249///
250// https://drafts.csswg.org/css-text-4/#text-align-all
251#[syntax(" start | end | left | right | center | <string> | justify | match-parent ")]
252#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
253#[style_value(
254 initial = "start",
255 applies_to = "block containers",
256 inherited = "yes",
257 percentages = "n/a",
258 canonical_order = "n/a",
259 animation_type = "discrete"
260)]
261#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
262#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-align-all"))]
263#[visit]
264pub enum TextAlignAllStyleValue {}
265
266/// Represents the style value for `text-align-last` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-align-last).
267///
268/// The text-align-last CSS property sets the alignment of the last line of text before a forced line break.
269///
270/// The grammar is defined as:
271///
272/// ```text,ignore
273/// auto | start | end | left | right | center | justify | match-parent
274/// ```
275///
276// https://drafts.csswg.org/css-text-4/#text-align-last
277#[syntax(" auto | start | end | left | right | center | justify | match-parent ")]
278#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
279#[style_value(
280 initial = "auto",
281 applies_to = "block containers",
282 inherited = "yes",
283 percentages = "n/a",
284 canonical_order = "n/a",
285 animation_type = "discrete"
286)]
287#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
288#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-align-last"))]
289#[visit]
290pub enum TextAlignLastStyleValue {}
291
292// /// Represents the style value for `text-justify` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-justify).
293// ///
294// /// The text-justify CSS property sets the justification method of text when text-align: justify is set.
295// ///
296// /// The grammar is defined as:
297// ///
298// /// ```text,ignore
299// /// [ auto | none | inter-word | inter-character | ruby ] || no-compress
300// /// ```
301// ///
302// // https://drafts.csswg.org/css-text-4/#text-justify
303// #[syntax(" [ auto | none | inter-word | inter-character | ruby ] || no-compress ")]
304// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
305// #[style_value(
306// initial = "auto",
307// applies_to = "text",
308// inherited = "yes",
309// percentages = "n/a",
310// canonical_order = "n/a",
311// animation_type = "discrete",
312// )]
313// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
314// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-justify"))]
315// #[visit]
316// pub struct TextJustifyStyleValue;
317
318/// Represents the style value for `word-spacing` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#word-spacing).
319///
320/// The word-spacing CSS property sets the amount of white space between words.
321///
322/// The grammar is defined as:
323///
324/// ```text,ignore
325/// normal | <length-percentage>
326/// ```
327///
328// https://drafts.csswg.org/css-text-4/#word-spacing
329#[syntax(" normal | <length-percentage> ")]
330#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
331#[style_value(
332 initial = "normal",
333 applies_to = "text",
334 inherited = "yes",
335 percentages = "relative to computed font-size, i.e. 1em",
336 canonical_order = "n/a",
337 animation_type = "by computed value type"
338)]
339#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
340#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.word-spacing"))]
341#[visit]
342pub enum WordSpacingStyleValue {}
343
344/// Represents the style value for `letter-spacing` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#letter-spacing).
345///
346/// The letter-spacing CSS property controls the amount of space between each letter in an element or block of text.
347///
348/// The grammar is defined as:
349///
350/// ```text,ignore
351/// normal | <length-percentage>
352/// ```
353///
354// https://drafts.csswg.org/css-text-4/#letter-spacing
355#[syntax(" normal | <length-percentage> ")]
356#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
357#[style_value(
358 initial = "normal",
359 applies_to = "inline boxes and text",
360 inherited = "yes",
361 percentages = "relative to computed font-size, i.e. 1em",
362 canonical_order = "n/a",
363 animation_type = "by computed value type"
364)]
365#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
366#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.letter-spacing"))]
367#[visit]
368pub enum LetterSpacingStyleValue {}
369
370// /// Represents the style value for `text-indent` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-indent).
371// ///
372// /// The text-indent CSS property sets the size of the empty space (indentation) at the beginning of lines in a text.
373// ///
374// /// The grammar is defined as:
375// ///
376// /// ```text,ignore
377// /// [ <length-percentage> ] && hanging? && each-line?
378// /// ```
379// ///
380// // https://drafts.csswg.org/css-text-4/#text-indent
381// #[syntax(" [ <length-percentage> ] && hanging? && each-line? ")]
382// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
383// #[style_value(
384// initial = "0",
385// applies_to = "block containers",
386// inherited = "yes",
387// percentages = "refers to block container’s own inline-axis inner size",
388// canonical_order = "per grammar",
389// animation_type = "by computed value type",
390// )]
391// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
392// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-indent"))]
393// #[visit]
394// pub struct TextIndentStyleValue;
395
396// /// Represents the style value for `hanging-punctuation` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#hanging-punctuation).
397// ///
398// /// The hanging-punctuation CSS property puts punctuation characters outside of the box to align the text with the rest of the document.
399// ///
400// /// The grammar is defined as:
401// ///
402// /// ```text,ignore
403// /// none | [ first || [ force-end | allow-end ] || last ]
404// /// ```
405// ///
406// // https://drafts.csswg.org/css-text-4/#hanging-punctuation
407// #[syntax(" none | [ first || [ force-end | allow-end ] || last ] ")]
408// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
409// #[style_value(
410// initial = "none",
411// applies_to = "text",
412// inherited = "yes",
413// percentages = "n/a",
414// canonical_order = "per grammar",
415// animation_type = "discrete",
416// )]
417// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
418// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.hanging-punctuation"))]
419// #[visit]
420// pub enum HangingPunctuationStyleValue {}
421
422// /// Represents the style value for `word-space-transform` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#word-space-transform).
423// ///
424// /// The grammar is defined as:
425// ///
426// /// ```text,ignore
427// /// none | [ space | ideographic-space ] && auto-phrase?
428// /// ```
429// ///
430// // https://drafts.csswg.org/css-text-4/#word-space-transform
431// #[syntax(" none | [ space | ideographic-space ] && auto-phrase? ")]
432// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
433// #[style_value(
434// initial = "none",
435// applies_to = "text",
436// inherited = "yes",
437// percentages = "n/a",
438// canonical_order = "per grammar",
439// animation_type = "discrete",
440// )]
441// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
442// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.word-space-transform"))]
443// #[visit]
444// pub enum WordSpaceTransformStyleValue {}
445
446/// Represents the style value for `white-space-collapse` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#white-space-collapse).
447///
448/// The white-space-collapse CSS property sets whether new line characters are shown as line breaks, and whether multiple consecutive spaces are all displayed or combined.
449///
450/// The grammar is defined as:
451///
452/// ```text,ignore
453/// collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces
454/// ```
455///
456// https://drafts.csswg.org/css-text-4/#white-space-collapse
457#[syntax(" collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces ")]
458#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
459#[style_value(
460 initial = "collapse",
461 applies_to = "text",
462 inherited = "yes",
463 percentages = "n/a",
464 canonical_order = "per grammar",
465 animation_type = "discrete"
466)]
467#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
468#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.white-space-collapse"))]
469#[visit]
470pub enum WhiteSpaceCollapseStyleValue {}
471
472// /// Represents the style value for `white-space-trim` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#white-space-trim).
473// ///
474// /// The grammar is defined as:
475// ///
476// /// ```text,ignore
477// /// none | discard-before || discard-after || discard-inner
478// /// ```
479// ///
480// // https://drafts.csswg.org/css-text-4/#white-space-trim
481// #[syntax(" none | discard-before || discard-after || discard-inner ")]
482// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
483// #[style_value(
484// initial = "none",
485// applies_to = "inline boxes and block containers",
486// inherited = "no",
487// percentages = "n/a",
488// canonical_order = "per grammar",
489// animation_type = "discrete",
490// )]
491// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
492// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.white-space-trim"))]
493// #[visit]
494// pub enum WhiteSpaceTrimStyleValue {}
495
496/// Represents the style value for `text-wrap-mode` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-wrap-mode).
497///
498/// The text-wrap-mode CSS property sets whether lines may wrap with the values wrap and nowrap. It is a longhand property for both white-space and text-wrap.
499///
500/// The grammar is defined as:
501///
502/// ```text,ignore
503/// wrap | nowrap
504/// ```
505///
506// https://drafts.csswg.org/css-text-4/#text-wrap-mode
507#[syntax(" wrap | nowrap ")]
508#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
509#[style_value(
510 initial = "wrap",
511 applies_to = "text",
512 inherited = "yes",
513 percentages = "n/a",
514 canonical_order = "per grammar",
515 animation_type = "discrete"
516)]
517#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
518#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-wrap-mode"))]
519#[visit]
520pub enum TextWrapModeStyleValue {}
521
522/// Represents the style value for `wrap-inside` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#wrap-inside).
523///
524/// The grammar is defined as:
525///
526/// ```text,ignore
527/// auto | avoid
528/// ```
529///
530// https://drafts.csswg.org/css-text-4/#wrap-inside
531#[syntax(" auto | avoid ")]
532#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
533#[style_value(
534 initial = "auto",
535 applies_to = "inline boxes",
536 inherited = "no",
537 percentages = "n/a",
538 canonical_order = "per grammar",
539 animation_type = "discrete"
540)]
541#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
542#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.wrap-inside"))]
543#[visit]
544pub enum WrapInsideStyleValue {}
545
546/// Represents the style value for `wrap-before` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#wrap-before).
547///
548/// The grammar is defined as:
549///
550/// ```text,ignore
551/// auto | avoid | avoid-line | avoid-flex | line | flex
552/// ```
553///
554// https://drafts.csswg.org/css-text-4/#wrap-before
555#[syntax(" auto | avoid | avoid-line | avoid-flex | line | flex ")]
556#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
557#[style_value(
558 initial = "auto",
559 applies_to = "inline-level boxes and flex items",
560 inherited = "no",
561 percentages = "n/a",
562 canonical_order = "per grammar",
563 animation_type = "discrete"
564)]
565#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
566#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.wrap-before"))]
567#[visit]
568pub enum WrapBeforeStyleValue {}
569
570/// Represents the style value for `wrap-after` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#wrap-after).
571///
572/// The grammar is defined as:
573///
574/// ```text,ignore
575/// auto | avoid | avoid-line | avoid-flex | line | flex
576/// ```
577///
578// https://drafts.csswg.org/css-text-4/#wrap-after
579#[syntax(" auto | avoid | avoid-line | avoid-flex | line | flex ")]
580#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
581#[style_value(
582 initial = "auto",
583 applies_to = "inline-level boxes and flex items",
584 inherited = "no",
585 percentages = "n/a",
586 canonical_order = "per grammar",
587 animation_type = "discrete"
588)]
589#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
590#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.wrap-after"))]
591#[visit]
592pub enum WrapAfterStyleValue {}
593
594/// Represents the style value for `text-wrap-style` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-wrap-style).
595///
596/// The text-wrap-style CSS property sets how lines break in text that overflows the container. It can also be set with the text-wrap shorthand.
597///
598/// The grammar is defined as:
599///
600/// ```text,ignore
601/// auto | balance | stable | pretty | avoid-orphans
602/// ```
603///
604// https://drafts.csswg.org/css-text-4/#text-wrap-style
605#[syntax(" auto | balance | stable | pretty | avoid-orphans ")]
606#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
607#[style_value(
608 initial = "auto",
609 applies_to = "block containers hat establish an inline formatting context",
610 inherited = "yes",
611 percentages = "n/a",
612 canonical_order = "per grammar",
613 animation_type = "discrete"
614)]
615#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
616#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-wrap-style"))]
617#[visit]
618pub enum TextWrapStyleStyleValue {}
619
620/// Represents the style value for `text-wrap` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-wrap).
621///
622/// The text-wrap CSS property sets how lines break in text that overflows the container. It is a shorthand for text-wrap-style and text-wrap-mode.
623///
624/// The grammar is defined as:
625///
626/// ```text,ignore
627/// <'text-wrap-mode'> || <'text-wrap-style'>
628/// ```
629///
630// https://drafts.csswg.org/css-text-4/#text-wrap
631#[syntax(" <'text-wrap-mode'> || <'text-wrap-style'> ")]
632#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
633#[style_value(
634 initial = "wrap",
635 applies_to = "see individual properties",
636 inherited = "see individual properties",
637 percentages = "see individual properties",
638 canonical_order = "per grammar",
639 animation_type = "see individual properties"
640)]
641#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
642#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-wrap"))]
643#[visit]
644pub struct TextWrapStyleValue;
645
646/// Represents the style value for `hyphenate-character` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#hyphenate-character).
647///
648/// The hyphenate-character CSS property sets the character or string to use at the end of a line before a line break.
649///
650/// The grammar is defined as:
651///
652/// ```text,ignore
653/// auto | <string>
654/// ```
655///
656// https://drafts.csswg.org/css-text-4/#hyphenate-character
657#[syntax(" auto | <string> ")]
658#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
659#[style_value(
660 initial = "auto",
661 applies_to = "text",
662 inherited = "yes",
663 percentages = "n/a",
664 canonical_order = "per grammar",
665 animation_type = "discrete"
666)]
667#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
668#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.hyphenate-character"))]
669#[visit]
670pub struct HyphenateCharacterStyleValue;
671
672/// Represents the style value for `hyphenate-limit-zone` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#hyphenate-limit-zone).
673///
674/// The grammar is defined as:
675///
676/// ```text,ignore
677/// <length-percentage>
678/// ```
679///
680// https://drafts.csswg.org/css-text-4/#hyphenate-limit-zone
681#[syntax(" <length-percentage> ")]
682#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
683#[style_value(
684 initial = "0",
685 applies_to = "block containers",
686 inherited = "yes",
687 percentages = "refers to length of the line box",
688 canonical_order = "per grammar",
689 animation_type = "by computed value type"
690)]
691#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
692#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.hyphenate-limit-zone"))]
693#[visit]
694pub struct HyphenateLimitZoneStyleValue;
695
696// /// Represents the style value for `hyphenate-limit-chars` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#hyphenate-limit-chars).
697// ///
698// /// The hyphenate-limit-chars CSS property sets the number of characters in a word before it is hyphenated and the minimum number of characters on either side of the hyphen.
699// ///
700// /// The grammar is defined as:
701// ///
702// /// ```text,ignore
703// /// [ auto | <integer> ]{1,3}
704// /// ```
705// ///
706// // https://drafts.csswg.org/css-text-4/#hyphenate-limit-chars
707// #[syntax(" [ auto | <integer> ]{1,3} ")]
708// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
709// #[style_value(
710// initial = "auto",
711// applies_to = "text",
712// inherited = "yes",
713// percentages = "n/a",
714// canonical_order = "per grammar",
715// animation_type = "by computed value type",
716// )]
717// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
718// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.hyphenate-limit-chars"))]
719// #[visit]
720// pub struct HyphenateLimitCharsStyleValue;
721
722/// Represents the style value for `hyphenate-limit-lines` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#hyphenate-limit-lines).
723///
724/// The grammar is defined as:
725///
726/// ```text,ignore
727/// no-limit | <integer>
728/// ```
729///
730// https://drafts.csswg.org/css-text-4/#hyphenate-limit-lines
731#[syntax(" no-limit | <integer> ")]
732#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
733#[style_value(
734 initial = "no-limit",
735 applies_to = "block containers",
736 inherited = "yes",
737 percentages = "n/a",
738 canonical_order = "per grammar",
739 animation_type = "by computed value type"
740)]
741#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
742#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.hyphenate-limit-lines"))]
743#[visit]
744pub enum HyphenateLimitLinesStyleValue {}
745
746/// Represents the style value for `hyphenate-limit-last` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#hyphenate-limit-last).
747///
748/// The grammar is defined as:
749///
750/// ```text,ignore
751/// none | always | column | page | spread
752/// ```
753///
754// https://drafts.csswg.org/css-text-4/#hyphenate-limit-last
755#[syntax(" none | always | column | page | spread ")]
756#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
757#[style_value(
758 initial = "none",
759 applies_to = "block containers",
760 inherited = "yes",
761 percentages = "n/a",
762 canonical_order = "per grammar",
763 animation_type = "discrete"
764)]
765#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
766#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.hyphenate-limit-last"))]
767#[visit]
768pub enum HyphenateLimitLastStyleValue {}
769
770/// Represents the style value for `text-group-align` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-group-align).
771///
772/// The grammar is defined as:
773///
774/// ```text,ignore
775/// none | start | end | left | right | center
776/// ```
777///
778// https://drafts.csswg.org/css-text-4/#text-group-align
779#[syntax(" none | start | end | left | right | center ")]
780#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
781#[style_value(
782 initial = "none",
783 applies_to = "block containers",
784 inherited = "no",
785 percentages = "n/a",
786 canonical_order = "per grammar",
787 animation_type = "discrete"
788)]
789#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
790#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-group-align"))]
791#[visit]
792pub enum TextGroupAlignStyleValue {}
793
794/// Represents the style value for `line-padding` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#line-padding).
795///
796/// The grammar is defined as:
797///
798/// ```text,ignore
799/// <length>
800/// ```
801///
802// https://drafts.csswg.org/css-text-4/#line-padding
803#[syntax(" <length> ")]
804#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
805#[style_value(
806 initial = "0",
807 applies_to = "inline boxes",
808 inherited = "yes",
809 percentages = "n/a",
810 canonical_order = "per grammar",
811 animation_type = "by computed value type"
812)]
813#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
814#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.line-padding"))]
815#[visit]
816pub struct LinePaddingStyleValue;
817
818/// Represents the style value for `text-autospace` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-autospace).
819///
820/// The text-autospace CSS property sets whether and how to insert spaces in inter-script text (such as when mixing Latin and Chinese characters) and around punctuation.
821///
822/// The grammar is defined as:
823///
824/// ```text,ignore
825/// normal | <autospace> | auto
826/// ```
827///
828// https://drafts.csswg.org/css-text-4/#text-autospace
829#[syntax(" normal | <autospace> | auto ")]
830#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
831#[style_value(
832 initial = "normal",
833 applies_to = "text",
834 inherited = "yes",
835 percentages = "n/a",
836 canonical_order = "per grammar",
837 animation_type = "discrete"
838)]
839#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
840#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-autospace"))]
841#[visit]
842pub enum TextAutospaceStyleValue {}
843
844/// Represents the style value for `text-spacing-trim` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-spacing-trim).
845///
846/// The text-spacing-trim CSS property controls spacing around CJK characters, avoiding excessive whitespace when using full-width punctuation characters.
847///
848/// The grammar is defined as:
849///
850/// ```text,ignore
851/// <spacing-trim> | auto
852/// ```
853///
854// https://drafts.csswg.org/css-text-4/#text-spacing-trim
855#[syntax(" <spacing-trim> | auto ")]
856#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
857#[style_value(
858 initial = "normal",
859 applies_to = "text",
860 inherited = "yes",
861 percentages = "n/a",
862 canonical_order = "per grammar",
863 animation_type = "discrete"
864)]
865#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
866#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-spacing-trim"))]
867#[visit]
868pub struct TextSpacingTrimStyleValue;
869
870// /// Represents the style value for `text-spacing` as defined in [css-text-4](https://drafts.csswg.org/css-text-4/#text-spacing).
871// ///
872// /// The grammar is defined as:
873// ///
874// /// ```text,ignore
875// /// none | auto | <spacing-trim> || <autospace>
876// /// ```
877// ///
878// // https://drafts.csswg.org/css-text-4/#text-spacing
879// #[syntax(" none | auto | <spacing-trim> || <autospace> ")]
880// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
881// #[style_value(
882// initial = "see individual properties",
883// applies_to = "text",
884// inherited = "yes",
885// percentages = "n/a",
886// canonical_order = "per grammar",
887// animation_type = "discrete",
888// )]
889// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
890// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.text-spacing"))]
891// #[visit]
892// pub enum TextSpacingStyleValue {}