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

mod impls;
use super::prelude::*;
use impls::*;
/// Represents the style value for `margin` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#margin).
///
/// The margin CSS property sets space around an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <'margin-top'>{1,4}
/// ```
///
/// https://drafts.csswg.org/css-box-4/#margin
#[syntax(" <'margin-top'>{1,4} ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    percentages = ContainingBlock,
    longhands = MarginBottom|MarginLeft|MarginRight|MarginTop,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    box_side = Top|Bottom|Left|Right,
    box_portion = Margin,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MarginStyleValue;

/// Represents the style value for `margin-bottom` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#margin-bottom).
///
/// The margin CSS property sets space around an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <length-percentage> | auto
/// ```
///
/// https://drafts.csswg.org/css-box-4/#margin-bottom
#[syntax(" <length-percentage> | auto ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    percentages = ContainingBlock,
    shorthand_group = Margin,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    logical_property_group = Margin,
    box_side = Bottom,
    box_portion = Margin,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-bottom"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MarginBottomStyleValue;

/// Represents the style value for `margin-left` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#margin-left).
///
/// The margin CSS property sets space around an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <length-percentage> | auto
/// ```
///
/// https://drafts.csswg.org/css-box-4/#margin-left
#[syntax(" <length-percentage> | auto ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    percentages = ContainingBlock,
    shorthand_group = Margin,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    logical_property_group = Margin,
    box_side = Left,
    box_portion = Margin,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-left"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MarginLeftStyleValue;

/// Represents the style value for `margin-right` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#margin-right).
///
/// The margin CSS property sets space around an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <length-percentage> | auto
/// ```
///
/// https://drafts.csswg.org/css-box-4/#margin-right
#[syntax(" <length-percentage> | auto ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    percentages = ContainingBlock,
    shorthand_group = Margin,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    logical_property_group = Margin,
    box_side = Right,
    box_portion = Margin,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-right"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MarginRightStyleValue;

/// Represents the style value for `margin-top` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#margin-top).
///
/// The margin CSS property sets space around an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <length-percentage> | auto
/// ```
///
/// https://drafts.csswg.org/css-box-4/#margin-top
#[syntax(" <length-percentage> | auto ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    percentages = ContainingBlock,
    shorthand_group = Margin,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    logical_property_group = Margin,
    box_side = Top,
    box_portion = Margin,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-top"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct MarginTopStyleValue;

/// Represents the style value for `margin-trim` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#margin-trim).
///
/// The margin-trim CSS property removes the margins of child elements when they meet the edges of the container.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// none | [ block || inline ] | [ block-start || inline-start || block-end || inline-end ]
/// ```
///
/// https://drafts.csswg.org/css-box-4/#margin-trim
#[syntax(" none | [ block || inline ] | [ block-start || inline-start || block-end || inline-end ] ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "none",
    applies_to = Unknown,
    animation_type = Discrete,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    box_portion = Margin,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.margin-trim"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum MarginTrimStyleValue {}

/// Represents the style value for `padding` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#padding).
///
/// The padding CSS property sets space between an element's edge and its contents. It is a shorthand for padding-top, padding-right, padding-bottom, and padding-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <'padding-top'>{1,4}
/// ```
///
/// https://drafts.csswg.org/css-box-4/#padding
#[syntax(" <'padding-top'>{1,4} ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "0",
    applies_to = Unknown,
    animation_type = ByComputedValue,
    percentages = ContainingBlock,
    longhands = PaddingBottom|PaddingLeft|PaddingRight|PaddingTop,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    box_side = Top|Bottom|Left|Right,
    box_portion = Padding,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct PaddingStyleValue;

/// Represents the style value for `padding-bottom` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#padding-bottom).
///
/// The padding CSS property sets space between an element's edge and its contents. It is a shorthand for padding-top, padding-right, padding-bottom, and padding-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <length-percentage [0,∞]>
/// ```
///
/// https://drafts.csswg.org/css-box-4/#padding-bottom
#[syntax(" <length-percentage [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,
    percentages = ContainingBlock,
    shorthand_group = Padding,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    logical_property_group = Padding,
    box_side = Bottom,
    box_portion = Padding,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-bottom"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct PaddingBottomStyleValue;

/// Represents the style value for `padding-left` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#padding-left).
///
/// The padding CSS property sets space between an element's edge and its contents. It is a shorthand for padding-top, padding-right, padding-bottom, and padding-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <length-percentage [0,∞]>
/// ```
///
/// https://drafts.csswg.org/css-box-4/#padding-left
#[syntax(" <length-percentage [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,
    percentages = ContainingBlock,
    shorthand_group = Padding,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    logical_property_group = Padding,
    box_side = Left,
    box_portion = Padding,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-left"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct PaddingLeftStyleValue;

/// Represents the style value for `padding-right` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#padding-right).
///
/// The padding CSS property sets space between an element's edge and its contents. It is a shorthand for padding-top, padding-right, padding-bottom, and padding-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <length-percentage [0,∞]>
/// ```
///
/// https://drafts.csswg.org/css-box-4/#padding-right
#[syntax(" <length-percentage [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,
    percentages = ContainingBlock,
    shorthand_group = Padding,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    logical_property_group = Padding,
    box_side = Right,
    box_portion = Padding,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-right"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct PaddingRightStyleValue;

/// Represents the style value for `padding-top` as defined in [css-box-4](https://drafts.csswg.org/css-box-4/#padding-top).
///
/// The padding CSS property sets space between an element's edge and its contents. It is a shorthand for padding-top, padding-right, padding-bottom, and padding-left.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// <length-percentage [0,∞]>
/// ```
///
/// https://drafts.csswg.org/css-box-4/#padding-top
#[syntax(" <length-percentage [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,
    percentages = ContainingBlock,
    shorthand_group = Padding,
    property_group = Box,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    logical_property_group = Padding,
    box_side = Top,
    box_portion = Padding,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.padding-top"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct PaddingTopStyleValue;