Skip to main content

css_ast/values/lists/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/ddbceaa3cee88f134d557c3051c26fcb5554a535
3// Do not edit this file directly.
4#![allow(warnings)]
5//! https://drafts.csswg.org/css-lists-3/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `counter-increment` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#counter-increment).
11///
12/// The counter-reset and counter-increment CSS properties and the counter() and counters() functions automatically number headings or ordered list items.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// [ <counter-name> <integer>? ]+ | none
18/// ```
19///
20/// https://drafts.csswg.org/css-lists-3/#counter-increment
21#[syntax(" [ <counter-name> <integer>? ]+ | none ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "none",
27    applies_to = Elements,
28    animation_type = ByComputedValue,
29    property_group = Lists,
30    computed_value_type = Unknown,
31    canonical_order = "per grammar",
32)]
33#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
34#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.counter-increment"))]
35#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
36#[derive(csskit_derives::NodeWithMetadata)]
37pub struct CounterIncrementStyleValue<'a>;
38
39/// Represents the style value for `counter-reset` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#counter-reset).
40///
41/// The counter-reset and counter-increment CSS properties and the counter() and counters() functions automatically number headings or ordered list items.
42///
43/// The grammar is defined as:
44///
45/// ```text,ignore
46/// [ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none
47/// ```
48///
49/// https://drafts.csswg.org/css-lists-3/#counter-reset
50#[syntax(" [ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none ")]
51#[derive(
52	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
53)]
54#[declaration_metadata(
55    initial = "none",
56    applies_to = Elements,
57    animation_type = ByComputedValue,
58    property_group = Lists,
59    computed_value_type = Unknown,
60    canonical_order = "per grammar",
61)]
62#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
63#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.counter-reset"))]
64#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
65#[derive(csskit_derives::NodeWithMetadata)]
66pub struct CounterResetStyleValue<'a>;
67
68/// Represents the style value for `counter-set` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#counter-set).
69///
70/// 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.
71///
72/// The grammar is defined as:
73///
74/// ```text,ignore
75/// [ <counter-name> <integer>? ]+ | none
76/// ```
77///
78/// https://drafts.csswg.org/css-lists-3/#counter-set
79#[syntax(" [ <counter-name> <integer>? ]+ | none ")]
80#[derive(
81	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
82)]
83#[declaration_metadata(
84    initial = "none",
85    applies_to = Elements,
86    animation_type = ByComputedValue,
87    property_group = Lists,
88    computed_value_type = Unknown,
89    canonical_order = "per grammar",
90)]
91#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
92#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.counter-set"))]
93#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
94#[derive(csskit_derives::NodeWithMetadata)]
95pub struct CounterSetStyleValue<'a>;
96
97/// Represents the style value for `list-style` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style).
98///
99/// 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.
100///
101/// The grammar is defined as:
102///
103/// ```text,ignore
104/// <'list-style-position'> || <'list-style-image'> || <'list-style-type'>
105/// ```
106///
107/// https://drafts.csswg.org/css-lists-3/#list-style
108#[syntax(" <'list-style-position'> || <'list-style-image'> || <'list-style-type'> ")]
109#[derive(
110	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
111)]
112#[declaration_metadata(
113    initial = "see individual properties",
114    inherits = Unknown,
115    applies_to = Unknown,
116    animation_type = Unknown,
117    percentages = Unknown,
118    longhands = ListStyleImage|ListStylePosition|ListStyleType,
119    property_group = Lists,
120    computed_value_type = Unknown,
121    canonical_order = "per grammar",
122)]
123#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
124#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style"))]
125#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
126#[derive(csskit_derives::NodeWithMetadata)]
127pub struct ListStyleStyleValue<'a>;
128
129/// Represents the style value for `list-style-image` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style-image).
130///
131/// 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.
132///
133/// The grammar is defined as:
134///
135/// ```text,ignore
136/// <image> | none
137/// ```
138///
139/// https://drafts.csswg.org/css-lists-3/#list-style-image
140#[syntax(" <image> | none ")]
141#[derive(
142	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
143)]
144#[declaration_metadata(
145    initial = "none",
146    inherits,
147    applies_to = Unknown,
148    animation_type = Discrete,
149    shorthand_group = ListStyle,
150    property_group = Lists,
151    computed_value_type = Unknown,
152    canonical_order = "per grammar",
153)]
154#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
155#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style-image"))]
156#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
157#[derive(csskit_derives::NodeWithMetadata)]
158pub struct ListStyleImageStyleValue<'a>;
159
160/// Represents the style value for `list-style-position` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style-position).
161///
162/// 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.
163///
164/// The grammar is defined as:
165///
166/// ```text,ignore
167/// inside | outside
168/// ```
169///
170/// https://drafts.csswg.org/css-lists-3/#list-style-position
171#[syntax(" inside | outside ")]
172#[derive(
173	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
174)]
175#[declaration_metadata(
176    initial = "outside",
177    inherits,
178    applies_to = Unknown,
179    animation_type = Discrete,
180    shorthand_group = ListStyle,
181    property_group = Lists,
182    computed_value_type = Unknown,
183    canonical_order = "per grammar",
184)]
185#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
186#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style-position"))]
187#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
188#[derive(csskit_derives::NodeWithMetadata)]
189pub enum ListStylePositionStyleValue {}
190
191/// Represents the style value for `list-style-type` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style-type).
192///
193/// 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.
194///
195/// The grammar is defined as:
196///
197/// ```text,ignore
198/// <counter-style> | <string> | none
199/// ```
200///
201/// https://drafts.csswg.org/css-lists-3/#list-style-type
202#[syntax(" <counter-style> | <string> | none ")]
203#[derive(
204	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
205)]
206#[declaration_metadata(
207    initial = "disc",
208    inherits,
209    applies_to = Unknown,
210    animation_type = Discrete,
211    shorthand_group = ListStyle,
212    property_group = Lists,
213    computed_value_type = AsSpecified,
214    canonical_order = "per grammar",
215)]
216#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
217#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style-type"))]
218#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
219#[derive(csskit_derives::NodeWithMetadata)]
220pub enum ListStyleTypeStyleValue<'a> {}
221
222/// Represents the style value for `marker-side` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#marker-side).
223///
224/// The grammar is defined as:
225///
226/// ```text,ignore
227/// match-self | match-parent
228/// ```
229///
230/// https://drafts.csswg.org/css-lists-3/#marker-side
231#[syntax(" match-self | match-parent ")]
232#[derive(
233	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
234)]
235#[declaration_metadata(
236    initial = "match-self",
237    inherits,
238    applies_to = Unknown,
239    animation_type = Discrete,
240    property_group = Lists,
241    computed_value_type = Unknown,
242    canonical_order = "per grammar",
243)]
244#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
245#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.marker-side"))]
246#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
247#[derive(csskit_derives::NodeWithMetadata)]
248pub enum MarkerSideStyleValue {}