css_ast/values/will_change/
mod.rs

1#![allow(warnings)]
2//! https://drafts.csswg.org/css-will-change-1/
3
4mod impls;
5use super::prelude::*;
6use impls::*;
7/// Represents the style value for `will-change` as defined in [css-will-change-1](https://drafts.csswg.org/css-will-change-1/#will-change).
8///
9/// The will-change CSS property gives hints to the browser about expected changes to an element's scroll position, contents, or style. These hints allow browsers to optimize for upcoming style changes.
10///
11/// The grammar is defined as:
12///
13/// ```text,ignore
14/// auto | <animateable-feature>#
15/// ```
16///
17/// https://drafts.csswg.org/css-will-change-1/#will-change
18#[syntax(" auto | <animateable-feature># ")]
19#[derive(
20	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
21)]
22#[declaration_metadata(
23    initial = "auto",
24    applies_to = Elements,
25    property_group = WillChange,
26    computed_value_type = AsSpecified,
27    canonical_order = "per grammar",
28)]
29#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.will-change"))]
31#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
32pub struct WillChangeStyleValue<'a>;