css_ast/values/line_grid/
mod.rs

1#![allow(warnings)]
2//! CSS Line Grid Module Level 1
3//! https://drafts.csswg.org/css-line-grid-1/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `line-grid` as defined in [css-line-grid-1](https://drafts.csswg.org/css-line-grid-1/#line-grid).
9///
10/// The grammar is defined as:
11///
12/// ```text,ignore
13/// match-parent | create
14/// ```
15///
16// https://drafts.csswg.org/css-line-grid-1/#line-grid
17#[syntax(" match-parent | create ")]
18#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
19#[style_value(
20	initial = "match-parent",
21	applies_to = "block, flex and grid containers",
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(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.line-grid"))]
29#[visit]
30pub enum LineGridStyleValue {}
31
32/// Represents the style value for `line-snap` as defined in [css-line-grid-1](https://drafts.csswg.org/css-line-grid-1/#line-snap).
33///
34/// The grammar is defined as:
35///
36/// ```text,ignore
37/// none | baseline | contain
38/// ```
39///
40// https://drafts.csswg.org/css-line-grid-1/#line-snap
41#[syntax(" none | baseline | contain ")]
42#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
43#[style_value(
44	initial = "none",
45	applies_to = "block container elements",
46	inherited = "yes",
47	percentages = "n/a",
48	canonical_order = "per grammar",
49	animation_type = "discrete"
50)]
51#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
52#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.line-snap"))]
53#[visit]
54pub enum LineSnapStyleValue {}
55
56/// Represents the style value for `box-snap` as defined in [css-line-grid-1](https://drafts.csswg.org/css-line-grid-1/#box-snap).
57///
58/// The grammar is defined as:
59///
60/// ```text,ignore
61/// none | block-start | block-end | center | baseline | last-baseline
62/// ```
63///
64// https://drafts.csswg.org/css-line-grid-1/#box-snap
65#[syntax(" none | block-start | block-end | center | baseline | last-baseline ")]
66#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
67#[style_value(
68	initial = "none",
69	applies_to = "block-level boxes and internal table elements except table cells",
70	inherited = "yes",
71	percentages = "n/a",
72	canonical_order = "per grammar",
73	animation_type = "discrete"
74)]
75#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
76#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.box-snap"))]
77#[visit]
78pub enum BoxSnapStyleValue {}