css_ast/values/color/
mod.rs1#![allow(warnings)]
2mod impls;
6use impls::*;
7
8#[syntax(" <color> ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22 initial = "CanvasText",
23 applies_to = "all elements and text",
24 inherited = "yes",
25 percentages = "n/a",
26 canonical_order = "per grammar",
27 animation_type = "by computed value type"
28)]
29#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.color"))]
31#[visit]
32pub struct ColorStyleValue;
33
34#[syntax(" <opacity-value> ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48 initial = "1",
49 applies_to = "all elements",
50 inherited = "no",
51 percentages = "map to the range [0,1]",
52 canonical_order = "per grammar",
53 animation_type = "by computed value type"
54)]
55#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
56#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.opacity"))]
57#[visit]
58pub struct OpacityStyleValue;