css_ast/values/conditional/
mod.rs

1#![allow(warnings)]
2//! CSS Conditional Rules Module Level 5
3//! https://drafts.csswg.org/css-conditional-5/
4
5mod impls;
6use impls::*;
7
8// /// Represents the style value for `container-type` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container-type).
9// ///
10// /// Container size queries with the @container at-rule apply styles to an element based on the dimensions of its container.
11// ///
12// /// The grammar is defined as:
13// ///
14// /// ```text,ignore
15// /// normal | [ [ size | inline-size ] || scroll-state ]
16// /// ```
17// ///
18// // https://drafts.csswg.org/css-conditional-5/#container-type
19// #[syntax(" normal | [ [ size | inline-size ] || scroll-state ] ")]
20// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21// #[style_value(
22// 	initial = "normal",
23//   applies_to = "all elements",
24// 	inherited = "no",
25// 	percentages = "n/a",
26// 	canonical_order = "per grammar",
27// 	animation_type = "not animatable",
28// )]
29// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container-type"))]
31// #[visit]
32// pub enum ContainerTypeStyleValue {}
33
34/// Represents the style value for `container-name` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container-name).
35///
36/// Container size queries with the @container at-rule apply styles to an element based on the dimensions of its container.
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// none | <custom-ident>+
42/// ```
43///
44// https://drafts.csswg.org/css-conditional-5/#container-name
45#[syntax(" none | <custom-ident>+ ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48	initial = "none",
49	applies_to = "all elements",
50	inherited = "no",
51	percentages = "n/a",
52	canonical_order = "per grammar",
53	animation_type = "not animatable"
54)]
55#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
56#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container-name"))]
57#[visit]
58pub struct ContainerNameStyleValue<'a>;
59
60// /// Represents the style value for `container` as defined in [css-conditional-5](https://drafts.csswg.org/css-conditional-5/#container).
61// ///
62// /// Container size queries with the @container at-rule apply styles to an element based on the dimensions of its container.
63// ///
64// /// The grammar is defined as:
65// ///
66// /// ```text,ignore
67// /// <'container-name'> [ / <'container-type'> ]?
68// /// ```
69// ///
70// // https://drafts.csswg.org/css-conditional-5/#container
71// #[syntax(" <'container-name'> [ / <'container-type'> ]? ")]
72// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
73// #[style_value(
74// 	initial = "see individual properties",
75//   applies_to = "see individual properties",
76// 	inherited = "see individual properties",
77// 	percentages = "see individual properties",
78// 	canonical_order = "per grammar",
79// 	animation_type = "see individual properties",
80// )]
81// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
82// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.container"))]
83// #[visit]
84// pub struct ContainerStyleValue;