css_ast/values/nav/
mod.rs

1#![allow(warnings)]
2//! CSS Spatial Navigation Level 1
3//! https://drafts.csswg.org/css-nav-1/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `spatial-navigation-contain` as defined in [css-nav-1](https://drafts.csswg.org/css-nav-1/#spatial-navigation-contain).
9///
10/// The grammar is defined as:
11///
12/// ```text,ignore
13/// auto | contain
14/// ```
15///
16// https://drafts.csswg.org/css-nav-1/#spatial-navigation-contain
17#[syntax(" auto | contain ")]
18#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
19#[style_value(
20	initial = "auto",
21	applies_to = "all elements",
22	inherited = "no",
23	percentages = "n/a",
24	canonical_order = "per grammar",
25	animation_type = "discrete"
26)]
27#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
28#[cfg_attr(
29	feature = "css_feature_data",
30	derive(ToCSSFeature),
31	css_feature("css.properties.spatial-navigation-contain")
32)]
33#[visit]
34pub enum SpatialNavigationContainStyleValue {}
35
36/// Represents the style value for `spatial-navigation-action` as defined in [css-nav-1](https://drafts.csswg.org/css-nav-1/#spatial-navigation-action).
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// auto | focus | scroll
42/// ```
43///
44// https://drafts.csswg.org/css-nav-1/#spatial-navigation-action
45#[syntax(" auto | focus | scroll ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48	initial = "auto",
49	applies_to = "scroll containers",
50	inherited = "no",
51	percentages = "n/a",
52	canonical_order = "per grammar",
53	animation_type = "discrete"
54)]
55#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
56#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.spatial-navigation-action"))]
57#[visit]
58pub enum SpatialNavigationActionStyleValue {}
59
60/// Represents the style value for `spatial-navigation-function` as defined in [css-nav-1](https://drafts.csswg.org/css-nav-1/#spatial-navigation-function).
61///
62/// The grammar is defined as:
63///
64/// ```text,ignore
65/// normal | grid
66/// ```
67///
68// https://drafts.csswg.org/css-nav-1/#spatial-navigation-function
69#[syntax(" normal | grid ")]
70#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
71#[style_value(
72	initial = "normal",
73	applies_to = "spatial navigation containers",
74	inherited = "no",
75	percentages = "n/a",
76	canonical_order = "per grammar",
77	animation_type = "discrete"
78)]
79#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
80#[cfg_attr(
81	feature = "css_feature_data",
82	derive(ToCSSFeature),
83	css_feature("css.properties.spatial-navigation-function")
84)]
85#[visit]
86pub enum SpatialNavigationFunctionStyleValue {}