css_ast/values/forms/
mod.rs

1#![allow(warnings)]
2//! CSS Form Control Styling Level 1
3//! https://drafts.csswg.org/css-forms-1/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `field-sizing` as defined in [css-forms-1](https://drafts.csswg.org/css-forms-1/#field-sizing).
9///
10/// The field-sizing CSS property allows form controls such as <textarea> to be sized based on their content.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// fixed | content
16/// ```
17///
18// https://drafts.csswg.org/css-forms-1/#field-sizing
19#[syntax(" fixed | content ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22	initial = "fixed",
23	applies_to = "elements with default preferred size",
24	inherited = "no",
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.field-sizing"))]
31#[visit]
32pub enum FieldSizingStyleValue {}
33
34/// Represents the style value for `slider-orientation` as defined in [css-forms-1](https://drafts.csswg.org/css-forms-1/#slider-orientation).
35///
36/// The grammar is defined as:
37///
38/// ```text,ignore
39/// auto | left-to-right | right-to-left | top-to-bottom | bottom-to-top
40/// ```
41///
42// https://drafts.csswg.org/css-forms-1/#slider-orientation
43#[syntax(" auto | left-to-right | right-to-left | top-to-bottom | bottom-to-top ")]
44#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
45#[style_value(
46	initial = "auto",
47	applies_to = "all elements",
48	inherited = "no",
49	percentages = "n/a",
50	canonical_order = "per grammar",
51	animation_type = "discrete"
52)]
53#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
54#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.slider-orientation"))]
55#[visit]
56pub enum SliderOrientationStyleValue {}
57
58/// Represents the style value for `input-security` as defined in [css-forms-1](https://drafts.csswg.org/css-forms-1/#input-security).
59///
60/// The grammar is defined as:
61///
62/// ```text,ignore
63/// auto | none
64/// ```
65///
66// https://drafts.csswg.org/css-forms-1/#input-security
67#[syntax(" auto | none ")]
68#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
69#[style_value(
70	initial = "auto",
71	applies_to = "sensitive text inputs",
72	inherited = "no",
73	percentages = "n/a",
74	canonical_order = "per grammar",
75	animation_type = "by computed value type"
76)]
77#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
78#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.input-security"))]
79#[visit]
80pub enum InputSecurityStyleValue {}