css_ast/values/will_change/
mod.rs

1#![allow(warnings)]
2//! CSS Will Change Module Level 1
3//! https://drafts.csswg.org/css-will-change-1/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `will-change` as defined in [css-will-change-1](https://drafts.csswg.org/css-will-change-1/#will-change).
9///
10/// 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.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// auto | <animateable-feature>#
16/// ```
17///
18// https://drafts.csswg.org/css-will-change-1/#will-change
19#[syntax(" auto | <animateable-feature># ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22	initial = "auto",
23	applies_to = "all elements",
24	inherited = "no",
25	percentages = "n/a",
26	canonical_order = "per grammar",
27	animation_type = "not animatable"
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#[visit]
32pub struct WillChangeStyleValue<'a>;