Skip to main content

css_ast/values/css2/
mod.rs

1//! CSS properties defined in the CSS2/CSS2.2 specification.
2//! <https://drafts.csswg.org/css2/>
3
4mod impls;
5use super::prelude::*;
6
7/// Represents the style value for `z-index` as defined in [css2](https://drafts.csswg.org/css2/#z-index).
8///
9/// The z-index CSS property orders overlapping elements, with higher values appearing in front of
10/// or on top of lower values.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// auto | <integer>
16/// ```
17///
18/// <https://drafts.csswg.org/css2/#z-index>
19#[syntax(" auto | <integer> ")]
20#[derive(
21	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
22)]
23#[declaration_metadata(
24    initial = "auto",
25    applies_to = Unknown,
26    animation_type = ByComputedValue,
27    property_group = Css2,
28    computed_value_type = AsSpecified,
29    canonical_order = "per grammar",
30)]
31#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
32#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.z-index"))]
33#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
34#[derive(csskit_derives::NodeWithMetadata)]
35pub struct ZIndexStyleValue;