css_ast/values/lists/mod.rs
1#![allow(warnings)]
2//! CSS Lists and Counters Module Level 3
3//! https://drafts.csswg.org/css-lists-3/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `list-style-image` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style-image).
9///
10/// The list-style shorthand CSS property and the list-style-image, list-style-position, and list-style-type longhand properties set the position and appearance of a list item's marker.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// <image> | none
16/// ```
17///
18// https://drafts.csswg.org/css-lists-3/#list-style-image
19#[syntax(" <image> | none ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22 initial = "none",
23 applies_to = "list items",
24 inherited = "yes",
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.list-style-image"))]
31#[visit]
32pub struct ListStyleImageStyleValue<'a>;
33
34/// Represents the style value for `list-style-type` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style-type).
35///
36/// The list-style shorthand CSS property and the list-style-image, list-style-position, and list-style-type longhand properties set the position and appearance of a list item's marker.
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// <counter-style> | <string> | none
42/// ```
43///
44// https://drafts.csswg.org/css-lists-3/#list-style-type
45#[syntax(" <counter-style> | <string> | none ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48 initial = "disc",
49 applies_to = "list items",
50 inherited = "yes",
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.list-style-type"))]
57#[visit]
58pub enum ListStyleTypeStyleValue<'a> {}
59
60/// Represents the style value for `list-style-position` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style-position).
61///
62/// The list-style shorthand CSS property and the list-style-image, list-style-position, and list-style-type longhand properties set the position and appearance of a list item's marker.
63///
64/// The grammar is defined as:
65///
66/// ```text,ignore
67/// inside | outside
68/// ```
69///
70// https://drafts.csswg.org/css-lists-3/#list-style-position
71#[syntax(" inside | outside ")]
72#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
73#[style_value(
74 initial = "outside",
75 applies_to = "list items",
76 inherited = "yes",
77 percentages = "n/a",
78 canonical_order = "per grammar",
79 animation_type = "discrete"
80)]
81#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
82#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style-position"))]
83#[visit]
84pub enum ListStylePositionStyleValue {}
85
86// /// Represents the style value for `list-style` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style).
87// ///
88// /// The list-style shorthand CSS property and the list-style-image, list-style-position, and list-style-type longhand properties set the position and appearance of a list item's marker.
89// ///
90// /// The grammar is defined as:
91// ///
92// /// ```text,ignore
93// /// <'list-style-position'> || <'list-style-image'> || <'list-style-type'>
94// /// ```
95// ///
96// // https://drafts.csswg.org/css-lists-3/#list-style
97// #[syntax(" <'list-style-position'> || <'list-style-image'> || <'list-style-type'> ")]
98// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
99// #[style_value(
100// initial = "see individual properties",
101// applies_to = "list items",
102// inherited = "see individual properties",
103// percentages = "see individual properties",
104// canonical_order = "per grammar",
105// animation_type = "see individual properties",
106// )]
107// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
108// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style"))]
109// #[visit]
110// pub struct ListStyleStyleValue;
111
112/// Represents the style value for `marker-side` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#marker-side).
113///
114/// The grammar is defined as:
115///
116/// ```text,ignore
117/// match-self | match-parent
118/// ```
119///
120// https://drafts.csswg.org/css-lists-3/#marker-side
121#[syntax(" match-self | match-parent ")]
122#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
123#[style_value(
124 initial = "match-self",
125 applies_to = "list items",
126 inherited = "yes",
127 percentages = "n/a",
128 canonical_order = "per grammar",
129 animation_type = "discrete"
130)]
131#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
132#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.marker-side"))]
133#[visit]
134pub enum MarkerSideStyleValue {}
135
136// /// Represents the style value for `counter-reset` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#counter-reset).
137// ///
138// /// The counter-reset and counter-increment CSS properties and the counter() and counters() functions automatically number headings or ordered list items.
139// ///
140// /// The grammar is defined as:
141// ///
142// /// ```text,ignore
143// /// [ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none
144// /// ```
145// ///
146// // https://drafts.csswg.org/css-lists-3/#counter-reset
147// #[syntax(" [ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none ")]
148// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
149// #[style_value(
150// initial = "none",
151// applies_to = "all elements",
152// inherited = "no",
153// percentages = "n/a",
154// canonical_order = "per grammar",
155// animation_type = "by computed value type",
156// )]
157// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
158// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.counter-reset"))]
159// #[visit]
160// pub enum CounterResetStyleValue<'a> {}
161
162// /// Represents the style value for `counter-increment` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#counter-increment).
163// ///
164// /// The counter-reset and counter-increment CSS properties and the counter() and counters() functions automatically number headings or ordered list items.
165// ///
166// /// The grammar is defined as:
167// ///
168// /// ```text,ignore
169// /// [ <counter-name> <integer>? ]+ | none
170// /// ```
171// ///
172// // https://drafts.csswg.org/css-lists-3/#counter-increment
173// #[syntax(" [ <counter-name> <integer>? ]+ | none ")]
174// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
175// #[style_value(
176// initial = "none",
177// applies_to = "all elements",
178// inherited = "no",
179// percentages = "n/a",
180// canonical_order = "per grammar",
181// animation_type = "by computed value type",
182// )]
183// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
184// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.counter-increment"))]
185// #[visit]
186// pub enum CounterIncrementStyleValue<'a> {}
187
188// /// Represents the style value for `counter-set` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#counter-set).
189// ///
190// /// The counter-set CSS property creates (and optionally sets a value for) a counter, the numbers for a series of headings or ordered list items.
191// ///
192// /// The grammar is defined as:
193// ///
194// /// ```text,ignore
195// /// [ <counter-name> <integer>? ]+ | none
196// /// ```
197// ///
198// // https://drafts.csswg.org/css-lists-3/#counter-set
199// #[syntax(" [ <counter-name> <integer>? ]+ | none ")]
200// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
201// #[style_value(
202// initial = "none",
203// applies_to = "all elements",
204// inherited = "no",
205// percentages = "n/a",
206// canonical_order = "per grammar",
207// animation_type = "by computed value type",
208// )]
209// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
210// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.counter-set"))]
211// #[visit]
212// pub enum CounterSetStyleValue<'a> {}