css_ast/values/page/
mod.rs

1#![allow(warnings)]
2//! CSS Paged Media Module Level 3
3//! https://drafts.csswg.org/css-page-4/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `page` as defined in [css-page-4](https://drafts.csswg.org/css-page-4/#page).
9///
10/// The :first, :left, and :right pseudo-classes select pages based on their position in sequence after pagination. They're often used with the page CSS property, to choose a print layout defined by the @page rule.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// auto | <custom-ident>
16/// ```
17///
18// https://drafts.csswg.org/css-page-4/#page
19#[syntax(" auto | <custom-ident> ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22	initial = "auto",
23	applies_to = "boxes that create class A break points",
24	inherited = "no (but see prose)",
25	percentages = "n/a",
26	canonical_order = "per grammar",
27	animation_type = "discrete"
28)]
29#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.page"))]
31#[visit]
32pub struct PageStyleValue;