css_ast/values/viewport/
mod.rs

1#![allow(warnings)]
2//! CSS Viewport Module Level 1
3//! https://drafts.csswg.org/css-viewport-1/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `zoom` as defined in [css-viewport-1](https://drafts.csswg.org/css-viewport-1/#zoom).
9///
10/// The zoom CSS property scales the size of an element. Unlike the transform property, a zoomed element affects page layout.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// <number [0,∞]> | <percentage [0,∞]>
16/// ```
17///
18// https://drafts.csswg.org/css-viewport-1/#zoom
19#[syntax(" <number [0,∞]> | <percentage [0,∞]> ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22	initial = "1",
23	applies_to = "all <length> property values of all elements",
24	inherited = "no",
25	percentages = "converted to <number>",
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.zoom"))]
31#[visit]
32pub struct ZoomStyleValue;