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-display-4/

mod impls;
use super::prelude::*;
use impls::*;
/// Represents the style value for `display` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#display).
///
/// The display CSS property sets the display behavior of an element's box within its layout and sets the layout behavior for its child elements.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// [ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy> | <display-legacy-vendor>
/// ```
///
/// https://drafts.csswg.org/css-display-4/#display
#[syntax(
	" [ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy> | <display-legacy-vendor> "
)]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "inline",
    applies_to = Elements,
    animation_type = Unknown,
    property_group = Display,
    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.display"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum DisplayStyleValue {}

/// Represents the style value for `order` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#order).
///
/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <integer>
/// ```
///
/// https://drafts.csswg.org/css-display-4/#order
#[syntax(" <integer> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    property_group = Display,
    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.order"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct OrderStyleValue;

/// Represents the style value for `reading-flow` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#reading-flow).
///
/// The reading-flow CSS property sets the order in which flex or grid elements are rendered to speech or reached via focus navigation. The reading-order property overrides this order.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// normal | source-order | flex-visual | flex-flow | grid-rows | grid-columns | grid-order
/// ```
///
/// https://drafts.csswg.org/css-display-4/#reading-flow
#[syntax(" normal | source-order | flex-visual | flex-flow | grid-rows | grid-columns | grid-order ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "normal",
    applies_to = Unknown,
    property_group = Display,
    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.reading-flow"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum ReadingFlowStyleValue {}

/// Represents the style value for `reading-order` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#reading-order).
///
/// The reading-flow CSS property sets the order in which flex or grid elements are rendered to speech or reached via focus navigation. The reading-order property overrides this order.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <integer>
/// ```
///
/// https://drafts.csswg.org/css-display-4/#reading-order
#[syntax(" <integer> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    property_group = Display,
    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.reading-order"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct ReadingOrderStyleValue;

/// Represents the style value for `visibility` as defined in [css-display-4](https://drafts.csswg.org/css-display-4/#visibility).
///
/// The visibility CSS property sets whether an element is shown. Invisible elements still affect the document layout.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// visible | hidden | force-hidden | collapse
/// ```
///
/// https://drafts.csswg.org/css-display-4/#visibility
#[syntax(" visible | hidden | force-hidden | collapse ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "visible",
    inherits,
    applies_to = Elements,
    animation_type = Discrete,
    property_group = Display,
    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.visibility"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum VisibilityStyleValue {}