Skip to main content

css_ast/values/contain/
mod.rs

1// AUTO-GENERATED from w3c/csswg-drafts
2// Commit: https://github.com/w3c/csswg-drafts/commit/e8f0279ce0beff5d70e59fa4165a668e1527fff6
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(" none | strict | content | [ [size | inline-size] || layout || style || paint ] ")]
22#[derive(
23	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
24)]
25#[declaration_metadata(
26    initial = "none",
27    applies_to = Unknown,
28    property_group = Contain,
29    computed_value_type = Unknown,
30    canonical_order = "per grammar",
31)]
32#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
33#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.contain"))]
34#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
35#[derive(csskit_derives::NodeWithMetadata)]
36pub enum ContainStyleValue {}
37
38/// Represents the style value for `content-visibility` as defined in [css-contain-4](https://drafts.csswg.org/css-contain-4/#content-visibility).
39///
40/// The content-visibility CSS property delays rendering an element, including layout and painting, until it is needed.
41///
42/// The grammar is defined as:
43///
44/// ```text,ignore
45/// visible | auto | hidden
46/// ```
47///
48/// https://drafts.csswg.org/css-contain-4/#content-visibility
49#[syntax(" visible | auto | hidden ")]
50#[derive(
51	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
52)]
53#[declaration_metadata(
54    initial = "visible",
55    applies_to = Unknown,
56    animation_type = Unknown,
57    property_group = Contain,
58    computed_value_type = AsSpecified,
59    canonical_order = "per grammar",
60)]
61#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
62#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.content-visibility"))]
63#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
64#[derive(csskit_derives::NodeWithMetadata)]
65pub enum ContentVisibilityStyleValue {}