Skip to main content

css_ast/values/conditional/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/e8f0279ce0beff5d70e59fa4165a668e1527fff6
3// Do not edit this file directly.
4#![allow(warnings)]
5//! https://drafts.csswg.org/css-conditional-5/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `container` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container).
11///
12/// Container size queries with the @container at-rule apply styles to an element based on the dimensions of its container.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// <'container-name'> [ / <'container-type'> ]?
18/// ```
19///
20/// https://drafts.csswg.org/css-conditional-5/#container
21#[syntax(" <'container-name'> [ / <'container-type'> ]? ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "see individual properties",
27    inherits = Unknown,
28    applies_to = Unknown,
29    animation_type = Unknown,
30    percentages = Unknown,
31    longhands = ContainerName|ContainerType,
32    property_group = Conditional,
33    computed_value_type = Unknown,
34    canonical_order = "per grammar",
35)]
36#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
37#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container"))]
38#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
39#[derive(csskit_derives::NodeWithMetadata)]
40pub struct ContainerStyleValue<'a>;
41
42/// Represents the style value for `container-name` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container-name).
43///
44/// Container size queries with the @container at-rule apply styles to an element based on the dimensions of its container.
45///
46/// The grammar is defined as:
47///
48/// ```text,ignore
49/// none | <custom-ident>+
50/// ```
51///
52/// https://drafts.csswg.org/css-conditional-5/#container-name
53#[syntax(" none | <custom-ident>+ ")]
54#[derive(
55	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
56)]
57#[declaration_metadata(
58    initial = "none",
59    applies_to = Elements,
60    shorthand_group = Container,
61    property_group = Conditional,
62    computed_value_type = Unknown,
63    canonical_order = "per grammar",
64)]
65#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
66#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container-name"))]
67#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
68#[derive(csskit_derives::NodeWithMetadata)]
69pub struct ContainerNameStyleValue<'a>;
70
71/// Represents the style value for `container-type` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container-type).
72///
73/// Container size queries with the @container at-rule apply styles to an element based on the dimensions of its container.
74///
75/// The grammar is defined as:
76///
77/// ```text,ignore
78/// normal | [ [ size | inline-size ] || scroll-state ]
79/// ```
80///
81/// https://drafts.csswg.org/css-conditional-5/#container-type
82#[syntax(" normal | [ [ size | inline-size ] || scroll-state ] ")]
83#[derive(
84	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
85)]
86#[declaration_metadata(
87    initial = "normal",
88    applies_to = Elements,
89    shorthand_group = Container,
90    property_group = Conditional,
91    computed_value_type = Unknown,
92    canonical_order = "per grammar",
93)]
94#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
95#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container-type"))]
96#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
97#[derive(csskit_derives::NodeWithMetadata)]
98pub enum ContainerTypeStyleValue {}