polished_css/property/layout/
box.rs

1crate::create_property!(
2    BoxSizing,
3    display = "",
4    atomic = "box-s",
5    custom = false,
6    data_type = "",
7    initial_value = ContentBox,
8    keywords = "border-box,content-box",
9);
10
11crate::create_property!(
12    BoxShadowColor,
13    display = "",
14    atomic = "box-sh-c",
15    custom = true,
16    data_type = "<color>",
17    initial_value = CurrentColor,
18    keywords = "currentColor",
19);
20
21#[cfg(test)]
22mod test {
23    #[test]
24    fn box_sizing() {
25        let name = "box-sizing";
26        crate::test_property_initial_value!(BoxSizing, ContentBox);
27        crate::test_global_keywords!(BoxSizing, name);
28        crate::test_function_var!(BoxSizing, name);
29        #[cfg(feature = "atomic")]
30        crate::test_atomic_property!(BoxSizing, "box-s");
31    }
32
33    #[test]
34    fn box_shadow_color() {
35        let name = "--box-shadow-color";
36        crate::test_property_initial_value!(BoxShadowColor, CurrentColor);
37        crate::test_global_keywords!(BoxShadowColor, name);
38        crate::test_function_var!(BoxShadowColor, name);
39        #[cfg(feature = "atomic")]
40        crate::test_atomic_property!(BoxShadowColor, "box-sh-c");
41    }
42}