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