css_ast/values/tables/
mod.rs

1#![allow(warnings)]
2//! CSS Table Module Level 3
3//! https://drafts.csswg.org/css-tables-3/
4
5mod impls;
6use impls::*;
7
8/// Represents the style value for `table-layout` as defined in [css-tables-3](https://drafts.csswg.org/css-tables-3/#table-layout).
9///
10/// The <table> HTML element, with several related elements, represents tabular data in rows and columns of cells.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// auto | fixed
16/// ```
17///
18// https://drafts.csswg.org/css-tables-3/#table-layout
19#[syntax(" auto | fixed ")]
20#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
21#[style_value(
22	initial = "auto",
23	applies_to = "table grid boxes",
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.table-layout"))]
31#[visit]
32pub enum TableLayoutStyleValue {}
33
34/// Represents the style value for `border-collapse` as defined in [css-tables-3](https://drafts.csswg.org/css-tables-3/#border-collapse).
35///
36/// The <table> HTML element, with several related elements, represents tabular data in rows and columns of cells.
37///
38/// The grammar is defined as:
39///
40/// ```text,ignore
41/// separate | collapse
42/// ```
43///
44// https://drafts.csswg.org/css-tables-3/#border-collapse
45#[syntax(" separate | collapse ")]
46#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
47#[style_value(
48	initial = "separate",
49	applies_to = "table grid boxes",
50	inherited = "yes",
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.border-collapse"))]
57#[visit]
58pub enum BorderCollapseStyleValue {}
59
60/// Represents the style value for `border-spacing` as defined in [css-tables-3](https://drafts.csswg.org/css-tables-3/#border-spacing).
61///
62/// The <table> HTML element, with several related elements, represents tabular data in rows and columns of cells.
63///
64/// The grammar is defined as:
65///
66/// ```text,ignore
67/// <length>{1,2}
68/// ```
69///
70// https://drafts.csswg.org/css-tables-3/#border-spacing
71#[syntax(" <length>{1,2} ")]
72#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
73#[style_value(
74	initial = "0px 0px",
75	applies_to = "table grid boxes when border-collapse is separate",
76	inherited = "yes",
77	percentages = "n/a",
78	canonical_order = "per grammar",
79	animation_type = "by computed value"
80)]
81#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
82#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.border-spacing"))]
83#[visit]
84pub struct BorderSpacingStyleValue;
85
86/// Represents the style value for `caption-side` as defined in [css-tables-3](https://drafts.csswg.org/css-tables-3/#caption-side).
87///
88/// The <table> HTML element, with several related elements, represents tabular data in rows and columns of cells.
89///
90/// The grammar is defined as:
91///
92/// ```text,ignore
93/// top | bottom
94/// ```
95///
96// https://drafts.csswg.org/css-tables-3/#caption-side
97#[syntax(" top | bottom ")]
98#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
99#[style_value(
100	initial = "top",
101	applies_to = "table-caption boxes",
102	inherited = "yes",
103	percentages = "n/a",
104	canonical_order = "per grammar",
105	animation_type = "discrete"
106)]
107#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
108#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.caption-side"))]
109#[visit]
110pub enum CaptionSideStyleValue {}
111
112/// Represents the style value for `empty-cells` as defined in [css-tables-3](https://drafts.csswg.org/css-tables-3/#empty-cells).
113///
114/// The <table> HTML element, with several related elements, represents tabular data in rows and columns of cells.
115///
116/// The grammar is defined as:
117///
118/// ```text,ignore
119/// show | hide
120/// ```
121///
122// https://drafts.csswg.org/css-tables-3/#empty-cells
123#[syntax(" show | hide ")]
124#[derive(Parse, Peek, ToSpan, ToCursors, StyleValue, Visitable, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
125#[style_value(
126	initial = "show",
127	applies_to = "table-cell boxes",
128	inherited = "yes",
129	percentages = "n/a",
130	canonical_order = "per grammar",
131	animation_type = "discrete"
132)]
133#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
134#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.empty-cells"))]
135#[visit]
136pub enum EmptyCellsStyleValue {}