css_ast/values/content/mod.rs
1#![allow(warnings)]
2//! CSS Generated Content Module Level 3
3//! https://drafts.csswg.org/css-content-3/
4
5mod impls;
6use impls::*;
7
8// /// Represents the style value for `content` as defined in [css-content-3](https://drafts.csswg.org/css-content-3/#content).
9// ///
10// /// The content CSS property sets the content inside of an element or pseudo-element, replacing the current value. It's often used with the ::before and ::after pseudo-elements to generate cosmetic content.
11// ///
12// /// The grammar is defined as:
13// ///
14// /// ```text,ignore
15// /// normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> | <attr()> ]+ ]?
16// /// ```
17// ///
18// // https://drafts.csswg.org/css-content-3/#content
19// #[syntax(" normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> | <attr()> ]+ ]? ")]
20// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21// #[style_value(
22// initial = "normal",
23// applies_to = "all elements, tree-abiding pseudo-elements, and page margin boxes",
24// inherited = "no",
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.content"))]
31// #[visit]
32// pub enum ContentStyleValue<'a> {}
33
34// /// Represents the style value for `quotes` as defined in [css-content-3](https://drafts.csswg.org/css-content-3/#quotes).
35// ///
36// /// The quotes CSS property sets the quotation marks inserted via the content CSS property or <q> element.
37// ///
38// /// The grammar is defined as:
39// ///
40// /// ```text,ignore
41// /// auto | none | match-parent | [ <string> <string> ]+
42// /// ```
43// ///
44// // https://drafts.csswg.org/css-content-3/#quotes
45// #[syntax(" auto | none | match-parent | [ <string> <string> ]+ ")]
46// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47// #[style_value(
48// initial = "auto",
49// applies_to = "all elements",
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.quotes"))]
57// #[visit]
58// pub enum QuotesStyleValue<'a> {}
59
60/// Represents the style value for `bookmark-level` as defined in [css-content-3](https://drafts.csswg.org/css-content-3/#bookmark-level).
61///
62/// The grammar is defined as:
63///
64/// ```text,ignore
65/// none | <integer [1,∞]>
66/// ```
67///
68// https://drafts.csswg.org/css-content-3/#bookmark-level
69#[syntax(" none | <integer [1,∞]> ")]
70#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
71#[style_value(
72 initial = "none",
73 applies_to = "all elements",
74 inherited = "no",
75 percentages = "n/a",
76 canonical_order = "per grammar",
77 animation_type = "by computed value type"
78)]
79#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
80#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.bookmark-level"))]
81#[visit]
82pub struct BookmarkLevelStyleValue;
83
84/// Represents the style value for `bookmark-label` as defined in [css-content-3](https://drafts.csswg.org/css-content-3/#bookmark-label).
85///
86/// The grammar is defined as:
87///
88/// ```text,ignore
89/// <content-list>
90/// ```
91///
92// https://drafts.csswg.org/css-content-3/#bookmark-label
93#[syntax(" <content-list> ")]
94#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
95#[style_value(
96 initial = "content(text)",
97 applies_to = "all elements",
98 inherited = "no",
99 percentages = "n/a",
100 canonical_order = "per grammar",
101 animation_type = "discrete"
102)]
103#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
104#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.bookmark-label"))]
105#[visit]
106pub struct BookmarkLabelStyleValue<'a>;
107
108/// Represents the style value for `bookmark-state` as defined in [css-content-3](https://drafts.csswg.org/css-content-3/#bookmark-state).
109///
110/// The grammar is defined as:
111///
112/// ```text,ignore
113/// open | closed
114/// ```
115///
116// https://drafts.csswg.org/css-content-3/#bookmark-state
117#[syntax(" open | closed ")]
118#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
119#[style_value(
120 initial = "open",
121 applies_to = "block-level elements",
122 inherited = "no",
123 percentages = "n/a",
124 canonical_order = "per grammar",
125 animation_type = "discrete"
126)]
127#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
128#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.bookmark-state"))]
129#[visit]
130pub enum BookmarkStateStyleValue {}