css_ast/values/scrollbars/
mod.rs

1#![allow(warnings)]
2//! CSS Scrollbars Styling Module Level 1
3//! https://drafts.csswg.org/css-scrollbars-1/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `scrollbar-color` as defined in [css-scrollbars-1](https://drafts.csswg.org/css-scrollbars-1/#scrollbar-color).
9///
10/// The scrollbar-color CSS property sets the color of the scrollbar track and thumb.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// auto | <color>{2}
16/// ```
17///
18// https://drafts.csswg.org/css-scrollbars-1/#scrollbar-color
19#[syntax(" auto | <color>{2} ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22	initial = "auto",
23	applies_to = "scroll containers",
24	inherited = "yes",
25	percentages = "n/a",
26	canonical_order = "per grammar",
27	animation_type = "by computed value"
28)]
29#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
30#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scrollbar-color"))]
31#[visit]
32pub struct ScrollbarColorStyleValue;
33
34/// Represents the style value for `scrollbar-width` as defined in [css-scrollbars-1](https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width).
35///
36/// The scrollbar-width CSS property sets the width of the scrollbar.
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// auto | thin | none
42/// ```
43///
44// https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width
45#[syntax(" auto | thin | none ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48	initial = "auto",
49	applies_to = "scroll containers",
50	inherited = "no",
51	percentages = "n/a",
52	canonical_order = "per grammar",
53	animation_type = "discrete"
54)]
55#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
56#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.scrollbar-width"))]
57#[visit]
58pub enum ScrollbarWidthStyleValue {}