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/40527902c4d0840cdb7a808c8cd42302be1c3bc8
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 = ListStylePosition|ListStyleImage|ListStyleType,
119    property_group = Lists,
120    computed_value_type = Unknown,
121    canonical_order = "per grammar",
122)]
123#[declaration_writes(ListStylePosition?, ListStyleImage?, ListStyleType?)]
124#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
125#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style"))]
126#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
127#[derive(csskit_derives::NodeWithMetadata)]
128pub struct ListStyleStyleValue<'a>;
129
130/// Represents the style value for `list-style-image` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style-image).
131///
132/// 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.
133///
134/// The grammar is defined as:
135///
136/// ```text,ignore
137/// <image> | none
138/// ```
139///
140/// https://drafts.csswg.org/css-lists-3/#list-style-image
141#[syntax(" <image> | none ")]
142#[derive(
143	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
144)]
145#[declaration_metadata(
146    initial = "none",
147    inherits,
148    applies_to = Unknown,
149    animation_type = Discrete,
150    shorthands = ListStyle,
151    property_group = Lists,
152    computed_value_type = Unknown,
153    canonical_order = "per grammar",
154)]
155#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
156#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style-image"))]
157#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
158#[derive(csskit_derives::NodeWithMetadata)]
159pub struct ListStyleImageStyleValue<'a>;
160
161/// Represents the style value for `list-style-position` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style-position).
162///
163/// 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.
164///
165/// The grammar is defined as:
166///
167/// ```text,ignore
168/// inside | outside
169/// ```
170///
171/// https://drafts.csswg.org/css-lists-3/#list-style-position
172#[syntax(" inside | outside ")]
173#[derive(
174	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
175)]
176#[declaration_metadata(
177    initial = "outside",
178    inherits,
179    applies_to = Unknown,
180    animation_type = Discrete,
181    shorthands = ListStyle,
182    property_group = Lists,
183    computed_value_type = Unknown,
184    canonical_order = "per grammar",
185)]
186#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
187#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style-position"))]
188#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
189#[derive(csskit_derives::NodeWithMetadata)]
190pub enum ListStylePositionStyleValue<'a> {}
191
192/// Represents the style value for `list-style-type` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#list-style-type).
193///
194/// 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.
195///
196/// The grammar is defined as:
197///
198/// ```text,ignore
199/// <counter-style> | <string> | none
200/// ```
201///
202/// https://drafts.csswg.org/css-lists-3/#list-style-type
203#[syntax(" <counter-style> | <string> | none ")]
204#[derive(
205	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
206)]
207#[declaration_metadata(
208    initial = "disc",
209    inherits,
210    applies_to = Unknown,
211    animation_type = Discrete,
212    shorthands = ListStyle,
213    property_group = Lists,
214    computed_value_type = AsSpecified,
215    canonical_order = "per grammar",
216)]
217#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
218#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.list-style-type"))]
219#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
220#[derive(csskit_derives::NodeWithMetadata)]
221pub enum ListStyleTypeStyleValue<'a> {}
222
223/// Represents the style value for `marker-side` as defined in [css-lists-3](https://drafts.csswg.org/css-lists-3/#marker-side).
224///
225/// The grammar is defined as:
226///
227/// ```text,ignore
228/// match-self | match-parent
229/// ```
230///
231/// https://drafts.csswg.org/css-lists-3/#marker-side
232#[syntax(" match-self | match-parent ")]
233#[derive(
234	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
235)]
236#[declaration_metadata(
237    initial = "match-self",
238    inherits,
239    applies_to = Unknown,
240    animation_type = Discrete,
241    property_group = Lists,
242    computed_value_type = Unknown,
243    canonical_order = "per grammar",
244)]
245#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
246#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.marker-side"))]
247#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
248#[derive(csskit_derives::NodeWithMetadata)]
249pub enum MarkerSideStyleValue<'a> {}