css_ast/values/compositing/
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/compositing-2/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `background-blend-mode` as defined in [compositing-2](https://drafts.csswg.org/compositing-2/#background-blend-mode).
11///
12/// The background-blend-mode CSS property blends an element's background image and background color using blend modes like multiply, difference, or color.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// <'mix-blend-mode'>#
18/// ```
19///
20/// https://drafts.csswg.org/compositing-2/#background-blend-mode
21#[syntax(" <'mix-blend-mode'># ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "normal",
27    applies_to = Unknown,
28    animation_type = Discrete,
29    property_group = Compositing,
30    computed_value_type = AsSpecified,
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.background-blend-mode"))]
35#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
36#[derive(csskit_derives::NodeWithMetadata)]
37pub struct BackgroundBlendModeStyleValue<'a>;
38
39/// Represents the style value for `isolation` as defined in [compositing-2](https://drafts.csswg.org/compositing-2/#isolation).
40///
41/// The isolation CSS property creates a new stacking context, which impacts z-index ordering and blend modes.
42///
43/// The grammar is defined as:
44///
45/// ```text,ignore
46/// <isolation-mode>
47/// ```
48///
49/// https://drafts.csswg.org/compositing-2/#isolation
50#[syntax(" <isolation-mode> ")]
51#[derive(
52	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
53)]
54#[declaration_metadata(
55    initial = "auto",
56    applies_to = Unknown,
57    animation_type = Discrete,
58    property_group = Compositing,
59    computed_value_type = AsSpecified,
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.isolation"))]
64#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
65#[derive(csskit_derives::NodeWithMetadata)]
66pub struct IsolationStyleValue;
67
68/// Represents the style value for `mix-blend-mode` as defined in [compositing-2](https://drafts.csswg.org/compositing-2/#mix-blend-mode).
69///
70/// The mix-blend-mode CSS property blends an element's content with its background or parent elements using blend modes like multiply, difference, or color.
71///
72/// The grammar is defined as:
73///
74/// ```text,ignore
75/// <blend-mode> | plus-lighter
76/// ```
77///
78/// https://drafts.csswg.org/compositing-2/#mix-blend-mode
79#[syntax(" <blend-mode> | plus-lighter ")]
80#[derive(
81	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
82)]
83#[declaration_metadata(
84    initial = "normal",
85    applies_to = Unknown,
86    animation_type = Discrete,
87    property_group = Compositing,
88    computed_value_type = AsSpecified,
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.mix-blend-mode"))]
93#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
94#[derive(csskit_derives::NodeWithMetadata)]
95pub enum MixBlendModeStyleValue {}