Skip to main content

css_ast/values/shapes/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/ddbceaa3cee88f134d557c3051c26fcb5554a535
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, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
51)]
52#[declaration_metadata(
53    initial = "auto",
54    applies_to = Block,
55    animation_type = Discrete,
56    property_group = Shapes,
57    computed_value_type = SpecifiedWithAbsoluteUrls,
58    canonical_order = "per grammar",
59)]
60#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
61#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.shape-inside"))]
62#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
63#[derive(csskit_derives::NodeWithMetadata)]
64pub enum ShapeInsideStyleValue<'a> {}
65
66/// Represents the style value for `shape-margin` as defined in [css-shapes-2](https://drafts.csswg.org/css-shapes-2/#shape-margin).
67///
68/// The shape-outside CSS property, along with shape-margin and shape-image-threshold, sets the shape around which adjacent content will wrap.
69///
70/// The grammar is defined as:
71///
72/// ```text,ignore
73/// <length-percentage [0,∞]>
74/// ```
75///
76/// https://drafts.csswg.org/css-shapes-2/#shape-margin
77#[syntax(" <length-percentage [0,∞]> ")]
78#[derive(
79	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
80)]
81#[declaration_metadata(
82    initial = "0",
83    applies_to = Unknown,
84    animation_type = ByComputedValue,
85    percentages = ContainingBlock,
86    property_group = Shapes,
87    computed_value_type = Unknown,
88    canonical_order = "per grammar",
89)]
90#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
91#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.shape-margin"))]
92#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
93#[derive(csskit_derives::NodeWithMetadata)]
94pub struct ShapeMarginStyleValue;
95
96/// Represents the style value for `shape-outside` as defined in [css-shapes-2](https://drafts.csswg.org/css-shapes-2/#shape-outside).
97///
98/// The shape-outside CSS property, along with shape-margin and shape-image-threshold, sets the shape around which adjacent content will wrap.
99///
100/// The grammar is defined as:
101///
102/// ```text,ignore
103/// none | [ <basic-shape> || <shape-box> ] | <image>
104/// ```
105///
106/// https://drafts.csswg.org/css-shapes-2/#shape-outside
107#[syntax(" none | [ <basic-shape> || <shape-box> ] | <image> ")]
108#[derive(
109	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
110)]
111#[declaration_metadata(
112    initial = "none",
113    applies_to = Unknown,
114    animation_type = Discrete,
115    property_group = Shapes,
116    computed_value_type = Unknown,
117    canonical_order = "per grammar",
118)]
119#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
120#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.shape-outside"))]
121#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
122#[derive(csskit_derives::NodeWithMetadata)]
123pub enum ShapeOutsideStyleValue<'a> {}
124
125/// Represents the style value for `shape-padding` as defined in [css-shapes-2](https://drafts.csswg.org/css-shapes-2/#shape-padding).
126///
127/// The grammar is defined as:
128///
129/// ```text,ignore
130/// <length-percentage [0,∞]>
131/// ```
132///
133/// https://drafts.csswg.org/css-shapes-2/#shape-padding
134#[syntax(" <length-percentage [0,∞]> ")]
135#[derive(
136	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
137)]
138#[declaration_metadata(
139    initial = "0",
140    applies_to = Block,
141    animation_type = ByComputedValue,
142    percentages = ContainingBlock,
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(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.shape-padding"))]
149#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
150#[derive(csskit_derives::NodeWithMetadata)]
151pub struct ShapePaddingStyleValue;