polished_css/property/typography/text/
decoration.rs

1crate::create_property!(
2    TextDecoration,
3    display = "",
4    atomic = "txt-d",
5    custom = false,
6    data_type = "",
7    initial_value = None,
8    keywords = "none",
9);
10
11crate::create_property!(
12    TextDecorationColor,
13    display = "",
14    atomic = "txt-d-c",
15    custom = false,
16    data_type = "<color>",
17    initial_value = CurrentColor,
18    keywords = "currentColor",
19);
20
21crate::create_property!(
22    TextDecorationLine,
23    display = "",
24    atomic = "txt-d-l",
25    custom = false,
26    data_type = "",
27    initial_value = None,
28    keywords = "none,underline,overline,line-through,blink",
29);
30
31crate::create_property!(
32    TextDecorationSkipLink,
33    display = "",
34    atomic = "txt-d-sl",
35    custom = false,
36    data_type = "",
37    initial_value = Auto,
38    keywords = "none,auto,all",
39);
40
41crate::create_property!(
42    TextDecorationStyle,
43    display = "",
44    atomic = "txt-d-s",
45    custom = false,
46    data_type = "",
47    initial_value = Solid,
48    keywords = "solid,double,dotted,dashed,wavy",
49);
50
51crate::create_property!(
52    TextDecorationThickness,
53    display = "",
54    atomic = "txt-d-t",
55    custom = false,
56    data_type = "<length-percentage>",
57    initial_value = Auto,
58    keywords = "auto,from-front",
59);
60
61#[cfg(test)]
62mod test {
63    #[test]
64    fn color() {
65        let name = "text-decoration-color";
66        crate::test_property_initial_value!(TextDecorationColor, CurrentColor);
67        crate::test_global_keywords!(TextDecorationColor, name);
68        crate::test_function_var!(TextDecorationColor, name);
69        #[cfg(feature = "atomic")]
70        crate::test_atomic_property!(TextDecorationColor, "txt-d-c");
71    }
72
73    #[test]
74    fn line() {
75        let name = "text-decoration-line";
76        crate::test_property_initial_value!(TextDecorationLine, None);
77        crate::test_global_keywords!(TextDecorationLine, name);
78        crate::test_function_var!(TextDecorationLine, name);
79        #[cfg(feature = "atomic")]
80        crate::test_atomic_property!(TextDecorationLine, "txt-d-l");
81    }
82
83    #[test]
84    fn skip_link() {
85        let name = "text-decoration-skip-link";
86        crate::test_property_initial_value!(TextDecorationSkipLink, Auto);
87        crate::test_global_keywords!(TextDecorationSkipLink, name);
88        crate::test_function_var!(TextDecorationSkipLink, name);
89        #[cfg(feature = "atomic")]
90        crate::test_atomic_property!(TextDecorationSkipLink, "txt-d-sl");
91    }
92
93    #[test]
94    fn style() {
95        let name = "text-decoration-style";
96        crate::test_property_initial_value!(TextDecorationStyle, Solid);
97        crate::test_global_keywords!(TextDecorationStyle, name);
98        crate::test_function_var!(TextDecorationStyle, name);
99        #[cfg(feature = "atomic")]
100        crate::test_atomic_property!(TextDecorationStyle, "txt-d-s");
101    }
102
103    #[test]
104    fn thickness() {
105        let name = "text-decoration-thickness";
106        crate::test_property_initial_value!(TextDecorationThickness, Auto);
107        crate::test_global_keywords!(TextDecorationThickness, name);
108        crate::test_function_var!(TextDecorationThickness, name);
109        #[cfg(feature = "atomic")]
110        crate::test_atomic_property!(TextDecorationThickness, "txt-d-t");
111    }
112}