css_ast/values/color_adjust/mod.rs
1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/7e27ad7484307dfdbe9d0e18ad19d02859389688
3// Do not edit this file directly.
4#![allow(warnings)]
5//! https://drafts.csswg.org/css-color-adjust-1/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `color-adjust` as defined in [css-color-adjust-1](https://drafts.csswg.org/css-color-adjust-1/#color-adjust).
11///
12/// The color-adjust shorthand CSS property allows multiple performance related color adjustments to be set at once. Setting the print-color-adjust CSS property directly is preferred, as it is the only such adjustment so far defined.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// <'print-color-adjust'>
18/// ```
19///
20/// https://drafts.csswg.org/css-color-adjust-1/#color-adjust
21#[syntax(" <'print-color-adjust'> ")]
22#[derive(
23 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26 initial = "see individual properties",
27 inherits = Unknown,
28 applies_to = Unknown,
29 animation_type = Unknown,
30 percentages = Unknown,
31 property_group = ColorAdjust,
32 computed_value_type = Unknown,
33 canonical_order = "per grammar",
34)]
35#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
36#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.color-adjust"))]
37#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
38#[derive(csskit_derives::NodeWithMetadata)]
39pub struct ColorAdjustStyleValue;
40
41// /// Represents the style value for `color-scheme` as defined in [css-color-adjust-1](https://drafts.csswg.org/css-color-adjust-1/#color-scheme).
42// ///
43// /// The color-scheme CSS property sets which color schemes (light or dark) an element uses and may prevent automatic dark mode adjustments by the browser.
44// ///
45// /// The grammar is defined as:
46// ///
47// /// ```text,ignore
48// /// normal | [ light | dark | <custom-ident> ]+ && only?
49// /// ```
50// ///
51// /// https://drafts.csswg.org/css-color-adjust-1/#color-scheme
52// #[syntax(" normal | [ light | dark | <custom-ident> ]+ && only? ")]
53// #[derive(
54// Parse,
55// Peek,
56// ToSpan,
57// ToCursors,
58// DeclarationMetadata,
59// SemanticEq,
60// Debug,
61// Clone,
62// PartialEq,
63// Eq,
64// PartialOrd,
65// Ord,
66// Hash,
67// )]
68// #[declaration_metadata(
69// initial = "normal",
70// inherits,
71// applies_to = Elements|Text,
72// animation_type = Discrete,
73// property_group = ColorAdjust,
74// computed_value_type = Unknown,
75// canonical_order = "per grammar",
76// )]
77// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
78// #[cfg_attr(
79// feature = "css_feature_data",
80// derive(ToCSSFeature),
81// css_feature("css.properties.color-scheme")
82// )]
83// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
84// #[derive(csskit_derives::NodeWithMetadata)]
85// pub enum ColorSchemeStyleValue<'a> {}
86
87/// Represents the style value for `forced-color-adjust` as defined in [css-color-adjust-1](https://drafts.csswg.org/css-color-adjust-1/#forced-color-adjust).
88///
89/// The forced-colors CSS @media rule detects when a user has chosen to use a forced colors mode, also known as high-contrast mode, and the forced-color-adjust CSS property sets whether forced colors apply to an element.
90///
91/// The grammar is defined as:
92///
93/// ```text,ignore
94/// auto | none | preserve-parent-color
95/// ```
96///
97/// https://drafts.csswg.org/css-color-adjust-1/#forced-color-adjust
98#[syntax(" auto | none | preserve-parent-color ")]
99#[derive(
100 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
101)]
102#[declaration_metadata(
103 initial = "auto",
104 inherits,
105 applies_to = Elements|Text,
106 property_group = ColorAdjust,
107 computed_value_type = AsSpecified,
108 canonical_order = "per grammar",
109)]
110#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
111#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.forced-color-adjust"))]
112#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
113#[derive(csskit_derives::NodeWithMetadata)]
114pub enum ForcedColorAdjustStyleValue {}
115
116/// Represents the style value for `print-color-adjust` as defined in [css-color-adjust-1](https://drafts.csswg.org/css-color-adjust-1/#print-color-adjust).
117///
118/// The print-color-adjust CSS property sets whether styles of printed pages should be adjusted to use less ink, in cases such as light text on a dark background.
119///
120/// The grammar is defined as:
121///
122/// ```text,ignore
123/// economy | exact
124/// ```
125///
126/// https://drafts.csswg.org/css-color-adjust-1/#print-color-adjust
127#[syntax(" economy | exact ")]
128#[derive(
129 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
130)]
131#[declaration_metadata(
132 initial = "economy",
133 inherits,
134 applies_to = Elements,
135 animation_type = Discrete,
136 property_group = ColorAdjust,
137 computed_value_type = Unknown,
138 canonical_order = "per grammar",
139)]
140#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
141#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.print-color-adjust"))]
142#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
143#[derive(csskit_derives::NodeWithMetadata)]
144pub enum PrintColorAdjustStyleValue {}