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-flexbox-2/

mod impls;
use super::prelude::*;
use impls::*;
/// Represents the style value for `flex` as defined in [css-flexbox-2](https://drafts.csswg.org/css-flexbox-2/#flex).
///
/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
/// ```
///
/// https://drafts.csswg.org/css-flexbox-2/#flex
#[syntax(" none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ] ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0 1 auto",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    percentages = Unknown,
    longhands = FlexBasis|FlexGrow|FlexShrink,
    property_group = Flexbox,
    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.flex"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct FlexStyleValue;

/// Represents the style value for `flex-basis` as defined in [css-flexbox-2](https://drafts.csswg.org/css-flexbox-2/#flex-basis).
///
/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// content | <'width'>
/// ```
///
/// https://drafts.csswg.org/css-flexbox-2/#flex-basis
#[syntax(" content | <'width'> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "auto",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    percentages = FlexContainer,
    shorthand_group = Flex,
    property_group = Flexbox,
    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.flex-basis"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum FlexBasisStyleValue {}

/// Represents the style value for `flex-direction` as defined in [css-flexbox-2](https://drafts.csswg.org/css-flexbox-2/#flex-direction).
///
/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// row | row-reverse | column | column-reverse
/// ```
///
/// https://drafts.csswg.org/css-flexbox-2/#flex-direction
#[syntax(" row | row-reverse | column | column-reverse ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "row",
    applies_to = Flex,
    animation_type = Discrete,
    shorthand_group = FlexFlow,
    property_group = Flexbox,
    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.flex-direction"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum FlexDirectionStyleValue {}

/// Represents the style value for `flex-flow` as defined in [css-flexbox-2](https://drafts.csswg.org/css-flexbox-2/#flex-flow).
///
/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <'flex-direction'> || <'flex-wrap'>
/// ```
///
/// https://drafts.csswg.org/css-flexbox-2/#flex-flow
#[syntax(" <'flex-direction'> || <'flex-wrap'> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "see individual properties",
    inherits = Unknown,
    applies_to = Unknown,
    animation_type = Unknown,
    percentages = Unknown,
    longhands = FlexDirection|FlexWrap,
    property_group = Flexbox,
    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.flex-flow"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct FlexFlowStyleValue;

/// Represents the style value for `flex-grow` as defined in [css-flexbox-2](https://drafts.csswg.org/css-flexbox-2/#flex-grow).
///
/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <number [0,∞]>
/// ```
///
/// https://drafts.csswg.org/css-flexbox-2/#flex-grow
#[syntax(" <number [0,∞]> ")]
#[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 = Flex,
    property_group = Flexbox,
    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.flex-grow"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct FlexGrowStyleValue;

/// Represents the style value for `flex-line-count` as defined in [css-flexbox-2](https://drafts.csswg.org/css-flexbox-2/#flex-line-count).
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <integer [1,∞]>
/// ```
///
/// https://drafts.csswg.org/css-flexbox-2/#flex-line-count
#[syntax(" <integer [1,∞]> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "1",
    applies_to = Unknown,
    animation_type = Unknown,
    property_group = Flexbox,
    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.flex-line-count"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct FlexLineCountStyleValue;

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

/// Represents the style value for `flex-wrap` as defined in [css-flexbox-2](https://drafts.csswg.org/css-flexbox-2/#flex-wrap).
///
/// Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// nowrap | [ wrap | wrap-reverse ] || balance
/// ```
///
/// https://drafts.csswg.org/css-flexbox-2/#flex-wrap
#[syntax(" nowrap | [ wrap | wrap-reverse ] || balance ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "nowrap",
    applies_to = Flex,
    animation_type = Discrete,
    shorthand_group = FlexFlow,
    property_group = Flexbox,
    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.flex-wrap"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum FlexWrapStyleValue {}