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-anchor-position-2/

mod impls;
use super::prelude::*;
use impls::*;
/// Represents the style value for `anchor-name` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#anchor-name).
///
/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// none | <anchor-name>#
/// ```
///
/// https://drafts.csswg.org/css-anchor-position-2/#anchor-name
#[syntax(" none | <anchor-name># ")]
#[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 = AnchorPosition,
    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.anchor-name"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct AnchorNameStyleValue<'a>;

/// Represents the style value for `anchor-scope` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#anchor-scope).
///
/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// none | all | <anchor-name>#
/// ```
///
/// https://drafts.csswg.org/css-anchor-position-2/#anchor-scope
#[syntax(" none | all | <anchor-name># ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "none",
    applies_to = Elements,
    animation_type = Discrete,
    property_group = AnchorPosition,
    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.anchor-scope"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum AnchorScopeStyleValue<'a> {}

/// Represents the style value for `position-anchor` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-anchor).
///
/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// normal | none | auto | <anchor-name> | match-parent
/// ```
///
/// https://drafts.csswg.org/css-anchor-position-2/#position-anchor
#[syntax(" normal | none | auto | <anchor-name> | match-parent ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "normal",
    applies_to = AbsPos,
    animation_type = Discrete,
    property_group = AnchorPosition,
    computed_value_type = AsSpecified,
    canonical_order = "per grammar",
    box_portion = Position,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-anchor"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum PositionAnchorStyleValue {}

/// Represents the style value for `position-area` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-area).
///
/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// none | <position-area>
/// ```
///
/// https://drafts.csswg.org/css-anchor-position-2/#position-area
#[syntax(" none | <position-area> ")]
#[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 = AnchorPosition,
    computed_value_type = Unknown,
    canonical_order = "per grammar",
    box_portion = Position,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-area"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct PositionAreaStyleValue;

// /// Represents the style value for `position-try` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-try).
// ///
// /// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
// ///
// /// The grammar is defined as:
// ///
// /// ```text,ignore
// /// <'position-try-order'>? <'position-try-fallbacks'>
// /// ```
// ///
// /// https://drafts.csswg.org/css-anchor-position-2/#position-try
// #[syntax(" <'position-try-order'>? <'position-try-fallbacks'> ")]
// #[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 = PositionTryFallbacks|PositionTryOrder,
//     property_group = AnchorPosition,
//     computed_value_type = Unknown,
//     canonical_order = "per grammar",
//     box_portion = Position,
// )]
// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
// #[cfg_attr(
//     feature = "css_feature_data",
//     derive(ToCSSFeature),
//     css_feature("css.properties.position-try")
// )]
// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
// #[derive(csskit_derives::NodeWithMetadata)]
// pub struct PositionTryStyleValue;

// /// Represents the style value for `position-try-fallbacks` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-try-fallbacks).
// ///
// /// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
// ///
// /// The grammar is defined as:
// ///
// /// ```text,ignore
// /// none | [ [<dashed-ident> || <try-tactic>] | <position-area> ]#
// /// ```
// ///
// /// https://drafts.csswg.org/css-anchor-position-2/#position-try-fallbacks
// #[syntax(" none | [ [<dashed-ident> || <try-tactic>] | <position-area> ]# ")]
// #[derive(
//     Parse,
//     Peek,
//     ToSpan,
//     ToCursors,
//     DeclarationMetadata,
//     SemanticEq,
//     Debug,
//     Clone,
//     PartialEq,
//     Eq,
//     PartialOrd,
//     Ord,
//     Hash,
// )]
// #[declaration_metadata(
//     initial = "none",
//     applies_to = AbsPos,
//     animation_type = Discrete,
//     shorthand_group = PositionTry,
//     property_group = AnchorPosition,
//     computed_value_type = AsSpecified,
//     canonical_order = "per grammar",
//     box_portion = Position,
// )]
// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
// #[cfg_attr(
//     feature = "css_feature_data",
//     derive(ToCSSFeature),
//     css_feature("css.properties.position-try-fallbacks")
// )]
// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
// #[derive(csskit_derives::NodeWithMetadata)]
// pub struct PositionTryFallbacksStyleValue<'a>;

/// Represents the style value for `position-try-order` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-try-order).
///
/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// normal | <try-size>
/// ```
///
/// https://drafts.csswg.org/css-anchor-position-2/#position-try-order
#[syntax(" normal | <try-size> ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "normal",
    applies_to = AbsPos,
    animation_type = Discrete,
    shorthand_group = PositionTry,
    property_group = AnchorPosition,
    computed_value_type = AsSpecified,
    canonical_order = "per grammar",
    box_portion = Position,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-try-order"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct PositionTryOrderStyleValue;

/// Represents the style value for `position-visibility` as defined in [css-anchor-position-2](https://drafts.csswg.org/css-anchor-position-2/#position-visibility).
///
/// Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.
///
/// The grammar is defined as:
///
/// ```text,ignore
/// always | [ anchors-valid || anchors-visible || no-overflow ]
/// ```
///
/// https://drafts.csswg.org/css-anchor-position-2/#position-visibility
#[syntax(" always | [ anchors-valid || anchors-visible || no-overflow ] ")]
#[derive(
	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
    initial = "anchors-visible",
    applies_to = AbsPos,
    animation_type = Discrete,
    property_group = AnchorPosition,
    computed_value_type = AsSpecified,
    canonical_order = "per grammar",
    box_portion = Position,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.position-visibility"))]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum PositionVisibilityStyleValue {}