css_ast 0.0.25

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/4a2d33ef63e58de3f090c0efc69a038c5c4c1527
// Do not edit this file directly.
#![allow(warnings)]
//! https://drafts.csswg.org/css-color-6/

mod impls;
use super::prelude::*;
use impls::*;
/// Represents the style value for `color` as defined in [css-color-6](https://drafts.csswg.org/css-color-6/#color).
///
/// The color CSS property sets the primary foreground color of an element, which is used for text, the default border color, and text decorations.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <color>
/// ```
///
/// https://drafts.csswg.org/css-color-6/#color
#[syntax(" <color> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "CanvasText",
    inherits,
    applies_to = Elements|Text,
    animation_type = ByComputedValue,
    property_group = Color,
    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.color"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct ColorStyleValue<'a>;

/// Represents the style value for `opacity` as defined in [css-color-6](https://drafts.csswg.org/css-color-6/#opacity).
///
/// The opacity CSS property sets the transparency of an element.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <opacity-value>
/// ```
///
/// https://drafts.csswg.org/css-color-6/#opacity
#[syntax(" <opacity-value> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "1",
    applies_to = Elements,
    animation_type = ByComputedValue,
    percentages = NormalizedRange,
    property_group = Color,
    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.opacity"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct OpacityStyleValue;