Skip to main content

css_ast/values/color_adjust/
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-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, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
55)]
56#[declaration_metadata(
57    initial = "normal",
58    inherits,
59    applies_to = Elements|Text,
60    animation_type = Discrete,
61    property_group = ColorAdjust,
62    computed_value_type = Unknown,
63    canonical_order = "per grammar",
64)]
65#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
66#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.color-scheme"))]
67#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
68#[derive(csskit_derives::NodeWithMetadata)]
69pub struct ColorSchemeStyleValue<'a>;
70
71/// 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).
72///
73/// 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.
74///
75/// The grammar is defined as:
76///
77/// ```text,ignore
78/// auto | none | preserve-parent-color
79/// ```
80///
81/// https://drafts.csswg.org/css-color-adjust-1/#forced-color-adjust
82#[syntax(" auto | none | preserve-parent-color ")]
83#[derive(
84	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
85)]
86#[declaration_metadata(
87    initial = "auto",
88    inherits,
89    applies_to = Elements|Text,
90    property_group = ColorAdjust,
91    computed_value_type = AsSpecified,
92    canonical_order = "per grammar",
93)]
94#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
95#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.forced-color-adjust"))]
96#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
97#[derive(csskit_derives::NodeWithMetadata)]
98pub enum ForcedColorAdjustStyleValue {}
99
100/// 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).
101///
102/// 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.
103///
104/// The grammar is defined as:
105///
106/// ```text,ignore
107/// economy | exact
108/// ```
109///
110/// https://drafts.csswg.org/css-color-adjust-1/#print-color-adjust
111#[syntax(" economy | exact ")]
112#[derive(
113	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
114)]
115#[declaration_metadata(
116    initial = "economy",
117    inherits,
118    applies_to = Elements,
119    animation_type = Discrete,
120    property_group = ColorAdjust,
121    computed_value_type = Unknown,
122    canonical_order = "per grammar",
123)]
124#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
125#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.print-color-adjust"))]
126#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
127#[derive(csskit_derives::NodeWithMetadata)]
128pub enum PrintColorAdjustStyleValue {}