css_ast/values/masking/
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-masking-1/
6
7mod impls;
8use super::prelude::*;
9use impls::*;
10/// Represents the style value for `clip-rule` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#clip-rule).
11///
12/// The SVG image format, represented by the <svg> element, creates two-dimensional vector graphics with declarative or scripted interaction and animation.
13///
14/// The grammar is defined as:
15///
16/// ```text,ignore
17/// nonzero | evenodd
18/// ```
19///
20/// https://drafts.csswg.org/css-masking-1/#clip-rule
21#[syntax(" nonzero | evenodd ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "nonzero",
27    inherits,
28    applies_to = Unknown,
29    animation_type = Discrete,
30    property_group = Masking,
31    computed_value_type = AsSpecified,
32    canonical_order = "per grammar",
33)]
34#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
35#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.clip-rule"))]
36#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
37#[derive(csskit_derives::NodeWithMetadata)]
38pub enum ClipRuleStyleValue {}
39
40/// Represents the style value for `mask-border-mode` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-border-mode).
41///
42/// The grammar is defined as:
43///
44/// ```text,ignore
45/// luminance | alpha
46/// ```
47///
48/// https://drafts.csswg.org/css-masking-1/#mask-border-mode
49#[syntax(" luminance | alpha ")]
50#[derive(
51	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
52)]
53#[declaration_metadata(
54    initial = "alpha",
55    applies_to = Unknown,
56    animation_type = Discrete,
57    shorthand_group = MaskBorder,
58    property_group = Masking,
59    computed_value_type = AsSpecified,
60    canonical_order = "per grammar",
61)]
62#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
63#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-border-mode"))]
64#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
65#[derive(csskit_derives::NodeWithMetadata)]
66pub enum MaskBorderModeStyleValue {}
67
68/// Represents the style value for `mask-border-outset` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-border-outset).
69///
70/// The mask-border CSS property sets how the edges of an element are masked. It is a shorthand for mask-border-outset, mask-border-repeat, mask-border-slice, mask-border-source, and mask-border-width.
71///
72/// The grammar is defined as:
73///
74/// ```text,ignore
75/// [ <length> | <number> ]{1,4}
76/// ```
77///
78/// https://drafts.csswg.org/css-masking-1/#mask-border-outset
79#[syntax(" [ <length> | <number> ]{1,4} ")]
80#[derive(
81	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
82)]
83#[declaration_metadata(
84    initial = "0",
85    applies_to = Unknown,
86    animation_type = ByComputedValue,
87    shorthand_group = MaskBorder,
88    property_group = Masking,
89    computed_value_type = Unknown,
90    canonical_order = "per grammar",
91)]
92#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
93#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-border-outset"))]
94#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
95#[derive(csskit_derives::NodeWithMetadata)]
96pub struct MaskBorderOutsetStyleValue;
97
98/// Represents the style value for `mask-border-repeat` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-border-repeat).
99///
100/// The mask-border CSS property sets how the edges of an element are masked. It is a shorthand for mask-border-outset, mask-border-repeat, mask-border-slice, mask-border-source, and mask-border-width.
101///
102/// The grammar is defined as:
103///
104/// ```text,ignore
105/// [ stretch | repeat | round | space ]{1,2}
106/// ```
107///
108/// https://drafts.csswg.org/css-masking-1/#mask-border-repeat
109#[syntax(" [ stretch | repeat | round | space ]{1,2} ")]
110#[derive(
111	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
112)]
113#[declaration_metadata(
114    initial = "stretch",
115    applies_to = Unknown,
116    animation_type = Discrete,
117    shorthand_group = MaskBorder,
118    property_group = Masking,
119    computed_value_type = AsSpecified,
120    canonical_order = "per grammar",
121)]
122#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
123#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-border-repeat"))]
124#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
125#[derive(csskit_derives::NodeWithMetadata)]
126pub struct MaskBorderRepeatStyleValue;
127
128/// Represents the style value for `mask-border-source` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-border-source).
129///
130/// The mask-border CSS property sets how the edges of an element are masked. It is a shorthand for mask-border-outset, mask-border-repeat, mask-border-slice, mask-border-source, and mask-border-width.
131///
132/// The grammar is defined as:
133///
134/// ```text,ignore
135/// none | <image>
136/// ```
137///
138/// https://drafts.csswg.org/css-masking-1/#mask-border-source
139#[syntax(" none | <image> ")]
140#[derive(
141	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
142)]
143#[declaration_metadata(
144    initial = "none",
145    applies_to = Unknown,
146    animation_type = Discrete,
147    shorthand_group = MaskBorder,
148    property_group = Masking,
149    computed_value_type = Unknown,
150    canonical_order = "per grammar",
151)]
152#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
153#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-border-source"))]
154#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
155#[derive(csskit_derives::NodeWithMetadata)]
156pub struct MaskBorderSourceStyleValue<'a>;
157
158/// Represents the style value for `mask-clip` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-clip).
159///
160/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
161///
162/// The grammar is defined as:
163///
164/// ```text,ignore
165/// [ <coord-box> | no-clip ]#
166/// ```
167///
168/// https://drafts.csswg.org/css-masking-1/#mask-clip
169#[syntax(" [ <coord-box> | no-clip ]# ")]
170#[derive(
171	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
172)]
173#[declaration_metadata(
174    initial = "border-box",
175    applies_to = Unknown,
176    animation_type = Discrete,
177    shorthand_group = Mask,
178    property_group = Masking,
179    computed_value_type = Unknown,
180    canonical_order = "per grammar",
181)]
182#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
183#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-clip"))]
184#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
185#[derive(csskit_derives::NodeWithMetadata)]
186pub struct MaskClipStyleValue<'a>;
187
188/// Represents the style value for `mask-origin` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-origin).
189///
190/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
191///
192/// The grammar is defined as:
193///
194/// ```text,ignore
195/// <coord-box>#
196/// ```
197///
198/// https://drafts.csswg.org/css-masking-1/#mask-origin
199#[syntax(" <coord-box># ")]
200#[derive(
201	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
202)]
203#[declaration_metadata(
204    initial = "border-box",
205    applies_to = Unknown,
206    animation_type = Discrete,
207    shorthand_group = Mask,
208    property_group = Masking,
209    computed_value_type = Unknown,
210    canonical_order = "per grammar",
211)]
212#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
213#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-origin"))]
214#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
215#[derive(csskit_derives::NodeWithMetadata)]
216pub struct MaskOriginStyleValue<'a>;
217
218/// Represents the style value for `mask-position` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-position).
219///
220/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
221///
222/// The grammar is defined as:
223///
224/// ```text,ignore
225/// <position>#
226/// ```
227///
228/// https://drafts.csswg.org/css-masking-1/#mask-position
229#[syntax(" <position># ")]
230#[derive(
231	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
232)]
233#[declaration_metadata(
234    initial = "0% 0%",
235    applies_to = Unknown,
236    animation_type = RepeatableList,
237    percentages = Unknown,
238    shorthand_group = Mask,
239    property_group = Masking,
240    computed_value_type = AbsoluteLengthOrPercentage,
241    canonical_order = "per grammar",
242)]
243#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
244#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-position"))]
245#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
246#[derive(csskit_derives::NodeWithMetadata)]
247pub struct MaskPositionStyleValue<'a>;
248
249/// Represents the style value for `mask-repeat` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-repeat).
250///
251/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
252///
253/// The grammar is defined as:
254///
255/// ```text,ignore
256/// <repeat-style>#
257/// ```
258///
259/// https://drafts.csswg.org/css-masking-1/#mask-repeat
260#[syntax(" <repeat-style># ")]
261#[derive(
262	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
263)]
264#[declaration_metadata(
265    initial = "repeat",
266    applies_to = Unknown,
267    animation_type = Discrete,
268    shorthand_group = Mask,
269    property_group = Masking,
270    computed_value_type = Unknown,
271    canonical_order = "per grammar",
272)]
273#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
274#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-repeat"))]
275#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
276#[derive(csskit_derives::NodeWithMetadata)]
277pub struct MaskRepeatStyleValue<'a>;
278
279/// Represents the style value for `mask-size` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-size).
280///
281/// The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
282///
283/// The grammar is defined as:
284///
285/// ```text,ignore
286/// <bg-size>#
287/// ```
288///
289/// https://drafts.csswg.org/css-masking-1/#mask-size
290#[syntax(" <bg-size># ")]
291#[derive(
292	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
293)]
294#[declaration_metadata(
295    initial = "auto",
296    applies_to = Unknown,
297    animation_type = RepeatableList,
298    shorthand_group = Mask,
299    property_group = Masking,
300    computed_value_type = Unknown,
301    canonical_order = "per grammar",
302)]
303#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
304#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-size"))]
305#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
306#[derive(csskit_derives::NodeWithMetadata)]
307pub struct MaskSizeStyleValue<'a>;
308
309/// Represents the style value for `mask-type` as defined in [css-masking-1](https://drafts.csswg.org/css-masking-1/#mask-type).
310///
311/// The mask-type CSS property on an SVG <mask> element sets whether the mask is a luminance or alpha mask.
312///
313/// The grammar is defined as:
314///
315/// ```text,ignore
316/// luminance | alpha
317/// ```
318///
319/// https://drafts.csswg.org/css-masking-1/#mask-type
320#[syntax(" luminance | alpha ")]
321#[derive(
322	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
323)]
324#[declaration_metadata(
325    initial = "luminance",
326    applies_to = Unknown,
327    animation_type = Discrete,
328    property_group = Masking,
329    computed_value_type = AsSpecified,
330    canonical_order = "per grammar",
331)]
332#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
333#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.mask-type"))]
334#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
335#[derive(csskit_derives::NodeWithMetadata)]
336pub enum MaskTypeStyleValue {}