css_ast/values/contain/
mod.rs

1#![allow(warnings)]
2//! https://drafts.csswg.org/css-contain-4/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7// /// Represents the style value for `contain` as defined in [css-contain-4](https://drafts.csswg.org/css-contain-4/#contain).
8// ///
9// /// The contain CSS property sets limits to the scope of styles, layout, and paint rendering for speed and efficiency. The none keyword value disables containment, strict is equivalent to contain: size layout style paint, and content is equivalent to contain: layout style paint.
10// ///
11// /// The grammar is defined as:
12// ///
13// /// ```text,ignore
14// /// none | strict | content | [ [size | inline-size] || layout || style || paint ]
15// /// ```
16// ///
17// /// https://drafts.csswg.org/css-contain-4/#contain
18// #[syntax(
19//     " none | strict | content | [ [size | inline-size] || layout || style || paint ] "
20// )]
21// #[derive(
22//     Parse,
23//     Peek,
24//     ToSpan,
25//     ToCursors,
26//     DeclarationMetadata,
27//     SemanticEq,
28//     Debug,
29//     Clone,
30//     PartialEq,
31//     Eq,
32//     PartialOrd,
33//     Ord,
34//     Hash,
35// )]
36// #[declaration_metadata(
37//     initial = "none",
38//     applies_to = Unknown,
39//     property_group = Contain,
40//     computed_value_type = Unknown,
41//     canonical_order = "per grammar",
42// )]
43// #[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
44// #[cfg_attr(
45//     feature = "css_feature_data",
46//     derive(ToCSSFeature),
47//     css_feature("css.properties.contain")
48// )]
49// #[cfg_attr(feature = "visitable", derive(Visitable), visit)]
50// pub enum ContainStyleValue {}
51
52/// Represents the style value for `content-visibility` as defined in [css-contain-4](https://drafts.csswg.org/css-contain-4/#content-visibility).
53///
54/// The content-visibility CSS property delays rendering an element, including layout and painting, until it is needed.
55///
56/// The grammar is defined as:
57///
58/// ```text,ignore
59/// visible | auto | hidden
60/// ```
61///
62/// https://drafts.csswg.org/css-contain-4/#content-visibility
63#[syntax(" visible | auto | hidden ")]
64#[derive(
65	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
66)]
67#[declaration_metadata(
68    initial = "visible",
69    applies_to = Unknown,
70    animation_type = Unknown,
71    property_group = Contain,
72    computed_value_type = AsSpecified,
73    canonical_order = "per grammar",
74)]
75#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
76#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.content-visibility"))]
77#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
78pub enum ContentVisibilityStyleValue {}