css_ast/values/regions/
mod.rs

1#![allow(warnings)]
2//! CSS Regions Module Level 1
3//! https://drafts.csswg.org/css-regions-1/
4
5mod impls;
6use impls::*;
7
8// /// Represents the style value for `flow-into` as defined in [css-regions-1](https://drafts.csswg.org/css-regions-1/#flow-into).
9// ///
10// /// The grammar is defined as:
11// ///
12// /// ```text,ignore
13// /// none | <custom-ident> [element | content]?
14// /// ```
15// ///
16// // https://drafts.csswg.org/css-regions-1/#flow-into
17// #[syntax(" none | <custom-ident> [element | content]? ")]
18// #[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
19// #[style_value(
20// 	initial = "none",
21//   applies_to = "All elements, but not pseudo-elements such as ::first-line, ::first-letter, ::before or ::after.",
22// 	inherited = "no",
23// 	percentages = "n/a",
24// 	canonical_order = "per grammar",
25// 	animation_type = "not animatable",
26// )]
27// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
28// #[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.flow-into"))]
29// #[visit]
30// pub enum FlowIntoStyleValue {}
31
32/// Represents the style value for `flow-from` as defined in [css-regions-1](https://drafts.csswg.org/css-regions-1/#flow-from).
33///
34/// The grammar is defined as:
35///
36/// ```text,ignore
37/// <custom-ident> | none
38/// ```
39///
40// https://drafts.csswg.org/css-regions-1/#flow-from
41#[syntax(" <custom-ident> | none ")]
42#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
43#[style_value(
44	initial = "none",
45	applies_to = "Non-replaced block containers.  This might be expanded in future versions of the specification to allow other types of containers to receive flow content.",
46	inherited = "no",
47	percentages = "n/a",
48	canonical_order = "per grammar",
49	animation_type = "not animatable"
50)]
51#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
52#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.flow-from"))]
53#[visit]
54pub struct FlowFromStyleValue;
55
56/// Represents the style value for `region-fragment` as defined in [css-regions-1](https://drafts.csswg.org/css-regions-1/#region-fragment).
57///
58/// The grammar is defined as:
59///
60/// ```text,ignore
61/// auto | break
62/// ```
63///
64// https://drafts.csswg.org/css-regions-1/#region-fragment
65#[syntax(" auto | break ")]
66#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
67#[style_value(
68	initial = "auto",
69	applies_to = "CSS Regions",
70	inherited = "no",
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.region-fragment"))]
77#[visit]
78pub enum RegionFragmentStyleValue {}