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