css_ast/values/view_transitions/
mod.rs

1#![allow(warnings)]
2//! https://drafts.csswg.org/css-view-transitions-2/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7/// Represents the style value for `view-transition-class` as defined in [css-view-transitions-2](https://drafts.csswg.org/css-view-transitions-2/#view-transition-class).
8///
9/// The view-transition-class CSS property sets a name that can be used to apply styles to multiple named view transition pseudo-elements.
10///
11/// The grammar is defined as:
12///
13/// ```text,ignore
14/// none | <custom-ident>+
15/// ```
16///
17/// https://drafts.csswg.org/css-view-transitions-2/#view-transition-class
18#[syntax(" none | <custom-ident>+ ")]
19#[derive(
20	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
21)]
22#[declaration_metadata(
23    initial = "none",
24    applies_to = Elements,
25    animation_type = Discrete,
26    property_group = ViewTransitions,
27    computed_value_type = AsSpecified,
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.view-transition-class"))]
32#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
33pub struct ViewTransitionClassStyleValue<'a>;
34
35/// Represents the style value for `view-transition-group` as defined in [css-view-transitions-2](https://drafts.csswg.org/css-view-transitions-2/#view-transition-group).
36///
37/// The grammar is defined as:
38///
39/// ```text,ignore
40/// normal | contain | nearest | <custom-ident>
41/// ```
42///
43/// https://drafts.csswg.org/css-view-transitions-2/#view-transition-group
44#[syntax(" normal | contain | nearest | <custom-ident> ")]
45#[derive(
46	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
47)]
48#[declaration_metadata(
49    initial = "normal",
50    applies_to = Elements,
51    animation_type = Discrete,
52    property_group = ViewTransitions,
53    computed_value_type = AsSpecified,
54    canonical_order = "per grammar",
55)]
56#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
57#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.view-transition-group"))]
58#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
59pub enum ViewTransitionGroupStyleValue {}
60
61/// Represents the style value for `view-transition-name` as defined in [css-view-transitions-2](https://drafts.csswg.org/css-view-transitions-2/#view-transition-name).
62///
63/// View transitions allow you to create animated visual transitions between different states of a document.
64///
65/// The grammar is defined as:
66///
67/// ```text,ignore
68/// none | <custom-ident>
69/// ```
70///
71/// https://drafts.csswg.org/css-view-transitions-2/#view-transition-name
72#[syntax(" none | <custom-ident> ")]
73#[derive(
74	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
75)]
76#[declaration_metadata(
77    initial = "none",
78    applies_to = Elements,
79    animation_type = Discrete,
80    property_group = ViewTransitions,
81    computed_value_type = AsSpecified,
82    canonical_order = "per grammar",
83)]
84#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
85#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.view-transition-name"))]
86#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
87pub struct ViewTransitionNameStyleValue;