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/40527902c4d0840cdb7a808c8cd42302be1c3bc8
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 a dimension of its container, such as width or height.
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#[declaration_writes(ContainerName, "/" ContainerType?)]
37#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
38#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container"))]
39#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
40#[derive(csskit_derives::NodeWithMetadata)]
41pub struct ContainerStyleValue<'a>;
42
43/// Represents the style value for `container-name` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container-name).
44///
45/// Container size queries with the @container (…) at-rule apply styles to an element based on a dimension of its container, such as width or height.
46///
47/// The grammar is defined as:
48///
49/// ```text,ignore
50/// none | <custom-ident>+
51/// ```
52///
53/// https://drafts.csswg.org/css-conditional-5/#container-name
54#[syntax(" none | <custom-ident>+ ")]
55#[derive(
56	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
57)]
58#[declaration_metadata(
59    initial = "none",
60    applies_to = Elements,
61    shorthands = Container,
62    property_group = Conditional,
63    computed_value_type = Unknown,
64    canonical_order = "per grammar",
65)]
66#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
67#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container-name"))]
68#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
69#[derive(csskit_derives::NodeWithMetadata)]
70pub struct ContainerNameStyleValue<'a>;
71
72/// Represents the style value for `container-type` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container-type).
73///
74/// Container size queries with the @container (…) at-rule apply styles to an element based on a dimension of its container, such as width or height.
75///
76/// The grammar is defined as:
77///
78/// ```text,ignore
79/// normal | [ [ size | inline-size ] || scroll-state ]
80/// ```
81///
82/// https://drafts.csswg.org/css-conditional-5/#container-type
83#[syntax(" normal | [ [ size | inline-size ] || scroll-state ] ")]
84#[derive(
85	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
86)]
87#[declaration_metadata(
88    initial = "normal",
89    applies_to = Elements,
90    shorthands = Container,
91    property_group = Conditional,
92    computed_value_type = Unknown,
93    canonical_order = "per grammar",
94)]
95#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
96#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container-type"))]
97#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
98#[derive(csskit_derives::NodeWithMetadata)]
99pub enum ContainerTypeStyleValue<'a> {}