css_ast/values/conditional/mod.rs
1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/7e27ad7484307dfdbe9d0e18ad19d02859389688
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,
24// Peek,
25// ToSpan,
26// ToCursors,
27// DeclarationMetadata,
28// SemanticEq,
29// Debug,
30// Clone,
31// PartialEq,
32// Eq,
33// PartialOrd,
34// Ord,
35// Hash,
36// )]
37// #[declaration_metadata(
38// initial = "see individual properties",
39// inherits = Unknown,
40// applies_to = Unknown,
41// animation_type = Unknown,
42// percentages = Unknown,
43// longhands = ContainerName|ContainerType,
44// property_group = Conditional,
45// computed_value_type = Unknown,
46// canonical_order = "per grammar",
47// )]
48// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
49// #[cfg_attr(
50// feature = "css_feature_data",
51// derive(ToCSSFeature),
52// css_feature("css.properties.container")
53// )]
54// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
55// #[derive(csskit_derives::NodeWithMetadata)]
56// pub struct ContainerStyleValue;
57
58/// Represents the style value for `container-name` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container-name).
59///
60/// Container size queries with the @container at-rule apply styles to an element based on the dimensions of its container.
61///
62/// The grammar is defined as:
63///
64/// ```text,ignore
65/// none | <custom-ident>+
66/// ```
67///
68/// https://drafts.csswg.org/css-conditional-5/#container-name
69#[syntax(" none | <custom-ident>+ ")]
70#[derive(
71 Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
72)]
73#[declaration_metadata(
74 initial = "none",
75 applies_to = Elements,
76 shorthand_group = Container,
77 property_group = Conditional,
78 computed_value_type = Unknown,
79 canonical_order = "per grammar",
80)]
81#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
82#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container-name"))]
83#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
84#[derive(csskit_derives::NodeWithMetadata)]
85pub struct ContainerNameStyleValue<'a>;
86
87// /// Represents the style value for `container-type` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container-type).
88// ///
89// /// Container size queries with the @container at-rule apply styles to an element based on the dimensions of its container.
90// ///
91// /// The grammar is defined as:
92// ///
93// /// ```text,ignore
94// /// normal | [ [ size | inline-size ] || scroll-state ]
95// /// ```
96// ///
97// /// https://drafts.csswg.org/css-conditional-5/#container-type
98// #[syntax(" normal | [ [ size | inline-size ] || scroll-state ] ")]
99// #[derive(
100// Parse,
101// Peek,
102// ToSpan,
103// ToCursors,
104// DeclarationMetadata,
105// SemanticEq,
106// Debug,
107// Clone,
108// PartialEq,
109// Eq,
110// PartialOrd,
111// Ord,
112// Hash,
113// )]
114// #[declaration_metadata(
115// initial = "normal",
116// applies_to = Elements,
117// shorthand_group = Container,
118// property_group = Conditional,
119// computed_value_type = Unknown,
120// canonical_order = "per grammar",
121// )]
122// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
123// #[cfg_attr(
124// feature = "css_feature_data",
125// derive(ToCSSFeature),
126// css_feature("css.properties.container-type")
127// )]
128// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
129// #[derive(csskit_derives::NodeWithMetadata)]
130// pub enum ContainerTypeStyleValue {}