css_ast/values/shapes/
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-shapes-2/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `shape-image-threshold` as defined in [css-shapes-2](https://drafts.csswg.org/css-shapes-2/#shape-image-threshold).
11///
12/// The shape-outside CSS property, along with shape-margin and shape-image-threshold, sets the shape around which adjacent content will wrap.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// <opacity-value>
18/// ```
19///
20/// https://drafts.csswg.org/css-shapes-2/#shape-image-threshold
21#[syntax(" <opacity-value> ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "0",
27    applies_to = Float,
28    animation_type = ByComputedValue,
29    property_group = Shapes,
30    computed_value_type = Unknown,
31    canonical_order = "per grammar",
32)]
33#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
34#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.shape-image-threshold"))]
35#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
36#[derive(csskit_derives::NodeWithMetadata)]
37pub struct ShapeImageThresholdStyleValue;
38
39// /// Represents the style value for `shape-inside` as defined in [css-shapes-2](https://drafts.csswg.org/css-shapes-2/#shape-inside).
40// ///
41// /// The grammar is defined as:
42// ///
43// /// ```text,ignore
44// /// auto | outside-shape | [ <basic-shape> || shape-box ] | <image> | display
45// /// ```
46// ///
47// /// https://drafts.csswg.org/css-shapes-2/#shape-inside
48// #[syntax(" auto | outside-shape | [ <basic-shape> || shape-box ] | <image> | display ")]
49// #[derive(
50//     Parse,
51//     Peek,
52//     ToSpan,
53//     ToCursors,
54//     DeclarationMetadata,
55//     SemanticEq,
56//     Debug,
57//     Clone,
58//     PartialEq,
59//     Eq,
60//     PartialOrd,
61//     Ord,
62//     Hash,
63// )]
64// #[declaration_metadata(
65//     initial = "auto",
66//     applies_to = Block,
67//     animation_type = Discrete,
68//     property_group = Shapes,
69//     computed_value_type = SpecifiedWithAbsoluteUrls,
70//     canonical_order = "per grammar",
71// )]
72// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
73// #[cfg_attr(
74//     feature = "css_feature_data",
75//     derive(ToCSSFeature),
76//     css_feature("css.properties.shape-inside")
77// )]
78// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
79// #[derive(csskit_derives::NodeWithMetadata)]
80// pub enum ShapeInsideStyleValue<'a> {}
81
82/// Represents the style value for `shape-margin` as defined in [css-shapes-2](https://drafts.csswg.org/css-shapes-2/#shape-margin).
83///
84/// The shape-outside CSS property, along with shape-margin and shape-image-threshold, sets the shape around which adjacent content will wrap.
85///
86/// The grammar is defined as:
87///
88/// ```text,ignore
89/// <length-percentage [0,∞]>
90/// ```
91///
92/// https://drafts.csswg.org/css-shapes-2/#shape-margin
93#[syntax(" <length-percentage [0,∞]> ")]
94#[derive(
95	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
96)]
97#[declaration_metadata(
98    initial = "0",
99    applies_to = Unknown,
100    animation_type = ByComputedValue,
101    percentages = ContainingBlock,
102    property_group = Shapes,
103    computed_value_type = Unknown,
104    canonical_order = "per grammar",
105)]
106#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
107#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.shape-margin"))]
108#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
109#[derive(csskit_derives::NodeWithMetadata)]
110pub struct ShapeMarginStyleValue;
111
112// /// Represents the style value for `shape-outside` as defined in [css-shapes-2](https://drafts.csswg.org/css-shapes-2/#shape-outside).
113// ///
114// /// The shape-outside CSS property, along with shape-margin and shape-image-threshold, sets the shape around which adjacent content will wrap.
115// ///
116// /// The grammar is defined as:
117// ///
118// /// ```text,ignore
119// /// none | [ <basic-shape> || <shape-box> ] | <image>
120// /// ```
121// ///
122// /// https://drafts.csswg.org/css-shapes-2/#shape-outside
123// #[syntax(" none | [ <basic-shape> || <shape-box> ] | <image> ")]
124// #[derive(
125//     Parse,
126//     Peek,
127//     ToSpan,
128//     ToCursors,
129//     DeclarationMetadata,
130//     SemanticEq,
131//     Debug,
132//     Clone,
133//     PartialEq,
134//     Eq,
135//     PartialOrd,
136//     Ord,
137//     Hash,
138// )]
139// #[declaration_metadata(
140//     initial = "none",
141//     applies_to = Unknown,
142//     animation_type = Discrete,
143//     property_group = Shapes,
144//     computed_value_type = Unknown,
145//     canonical_order = "per grammar",
146// )]
147// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
148// #[cfg_attr(
149//     feature = "css_feature_data",
150//     derive(ToCSSFeature),
151//     css_feature("css.properties.shape-outside")
152// )]
153// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
154// #[derive(csskit_derives::NodeWithMetadata)]
155// pub enum ShapeOutsideStyleValue<'a> {}
156
157/// Represents the style value for `shape-padding` as defined in [css-shapes-2](https://drafts.csswg.org/css-shapes-2/#shape-padding).
158///
159/// The grammar is defined as:
160///
161/// ```text,ignore
162/// <length-percentage [0,∞]>
163/// ```
164///
165/// https://drafts.csswg.org/css-shapes-2/#shape-padding
166#[syntax(" <length-percentage [0,∞]> ")]
167#[derive(
168	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
169)]
170#[declaration_metadata(
171    initial = "0",
172    applies_to = Block,
173    animation_type = ByComputedValue,
174    percentages = ContainingBlock,
175    property_group = Shapes,
176    computed_value_type = Unknown,
177    canonical_order = "per grammar",
178)]
179#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
180#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.shape-padding"))]
181#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
182#[derive(csskit_derives::NodeWithMetadata)]
183pub struct ShapePaddingStyleValue;