css_ast 0.0.21

CSS Abstract Syntax Trees with visitable nodes and style value types.
Documentation
// AUTO-GENERATED from w3c/csswg-drafts
// Commit: https://github.com/w3c/csswg-drafts/commit/e8f0279ce0beff5d70e59fa4165a668e1527fff6
// Do not edit this file directly.
#![allow(warnings)]
//! https://drafts.csswg.org/css-masking-1/

mod impls;
use super::prelude::*;
use impls::*;
/// Represents the style value for `clip-rule` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#clip-rule).
///
/// The SVG image format, represented by the <svg> element, creates two-dimensional vector graphics with declarative or scripted interaction and animation.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// nonzero | evenodd
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#clip-rule
#[syntax(" nonzero | evenodd ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "nonzero",
    inherits,
    applies_to = Unknown,
    animation_type = Discrete,
    property_group = Masking,
    computed_value_type = AsSpecified,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.clip-rule"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum ClipRuleStyleValue {}

/// Represents the style value for `mask-border-mode` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-border-mode).
///
/// The grammar is defined as:
///
/// ```text,ignore
/// luminance | alpha
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-border-mode
#[syntax(" luminance | alpha ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "alpha",
    applies_to = Unknown,
    animation_type = Discrete,
    shorthand_group = MaskBorder,
    property_group = Masking,
    computed_value_type = AsSpecified,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-border-mode"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum MaskBorderModeStyleValue {}

/// Represents the style value for `mask-border-outset` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-border-outset).
///
/// The mask-border CSS property sets how the edges of an element are masked. It is a shorthand for mask-border-outset, mask-border-repeat, mask-border-slice, mask-border-source, and mask-border-width.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <'border-image-outset'>
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-border-outset
#[syntax(" <'border-image-outset'> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    shorthand_group = MaskBorder,
    property_group = Masking,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-border-outset"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MaskBorderOutsetStyleValue;

/// Represents the style value for `mask-border-repeat` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-border-repeat).
///
/// The mask-border CSS property sets how the edges of an element are masked. It is a shorthand for mask-border-outset, mask-border-repeat, mask-border-slice, mask-border-source, and mask-border-width.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <'border-image-repeat'>
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-border-repeat
#[syntax(" <'border-image-repeat'> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "stretch",
    applies_to = Unknown,
    animation_type = Discrete,
    shorthand_group = MaskBorder,
    property_group = Masking,
    computed_value_type = AsSpecified,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-border-repeat"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MaskBorderRepeatStyleValue;

/// Represents the style value for `mask-border-source` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-border-source).
///
/// The mask-border CSS property sets how the edges of an element are masked. It is a shorthand for mask-border-outset, mask-border-repeat, mask-border-slice, mask-border-source, and mask-border-width.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <'border-image-source'>
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-border-source
#[syntax(" <'border-image-source'> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "none",
    applies_to = Unknown,
    animation_type = Discrete,
    shorthand_group = MaskBorder,
    property_group = Masking,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-border-source"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MaskBorderSourceStyleValue<'a>;

/// Represents the style value for `mask-clip` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-clip).
///
/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// [ <coord-box> | no-clip ]#
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-clip
#[syntax(" [ <coord-box> | no-clip ]# ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "border-box",
    applies_to = Unknown,
    animation_type = Discrete,
    shorthand_group = Mask,
    property_group = Masking,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-clip"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MaskClipStyleValue<'a>;

/// Represents the style value for `mask-origin` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-origin).
///
/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <coord-box>#
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-origin
#[syntax(" <coord-box># ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "border-box",
    applies_to = Unknown,
    animation_type = Discrete,
    shorthand_group = Mask,
    property_group = Masking,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-origin"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MaskOriginStyleValue<'a>;

/// Represents the style value for `mask-position` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-position).
///
/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <position>#
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-position
#[syntax(" <position># ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0% 0%",
    applies_to = Unknown,
    animation_type = RepeatableList,
    percentages = Unknown,
    shorthand_group = Mask,
    property_group = Masking,
    computed_value_type = AbsoluteLengthOrPercentage,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-position"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MaskPositionStyleValue<'a>;

/// Represents the style value for `mask-repeat` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-repeat).
///
/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <repeat-style>#
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-repeat
#[syntax(" <repeat-style># ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "repeat",
    applies_to = Unknown,
    animation_type = Discrete,
    shorthand_group = Mask,
    property_group = Masking,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-repeat"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MaskRepeatStyleValue<'a>;

/// Represents the style value for `mask-size` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-size).
///
/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <bg-size>#
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-size
#[syntax(" <bg-size># ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "auto",
    applies_to = Unknown,
    animation_type = RepeatableList,
    shorthand_group = Mask,
    property_group = Masking,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-size"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MaskSizeStyleValue<'a>;

/// Represents the style value for `mask-type` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-type).
///
/// The mask-type CSS property on an SVG <mask> element sets whether the mask is a luminance or alpha mask.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// luminance | alpha
/// ```
///
/// https://drafts.csswg.org/css-masking-1/#mask-type
#[syntax(" luminance | alpha ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "luminance",
    applies_to = Unknown,
    animation_type = Discrete,
    property_group = Masking,
    computed_value_type = AsSpecified,
    canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-type"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum MaskTypeStyleValue {}