polished_css/property/misc/
shape.rs

1// TODO: Implement once <image> data type is ready
2crate::create_property!(
3    ShapeImageThreshold,
4    display = "",
5    atomic = "shape-i-t",
6    custom = false,
7    data_type = "<alpha>",
8    initial_value = Initial,
9    keywords = "",
10);
11
12crate::create_property!(
13    ShapeMargin,
14    display = "",
15    atomic = "shape-m",
16    custom = false,
17    data_type = "<length-percentage>",
18    initial_value = Initial,
19    keywords = "",
20);
21
22crate::create_property!(
23    ShapeOutside,
24    display = "",
25    atomic = "shape-o",
26    custom = false,
27    data_type = "",
28    initial_value = None,
29    keywords = "none,margin-box,border-box,padding-box,content-box",
30);
31
32#[cfg(test)]
33mod test {
34    #[test]
35    fn shape_image_threshold() {
36        let name = "shape-image-threshold";
37        crate::test_property_initial_value!(ShapeImageThreshold, Initial);
38        crate::test_global_keywords!(ShapeImageThreshold, name);
39        crate::test_function_var!(ShapeImageThreshold, name);
40        #[cfg(feature = "atomic")]
41        crate::test_atomic_property!(ShapeImageThreshold, "shape-i-t");
42    }
43
44    #[test]
45    fn shape_margin() {
46        let name = "shape-margin";
47        crate::test_property_initial_value!(ShapeMargin, Initial);
48        crate::test_global_keywords!(ShapeMargin, name);
49        crate::test_function_var!(ShapeMargin, name);
50        #[cfg(feature = "atomic")]
51        crate::test_atomic_property!(ShapeMargin, "shape-m");
52    }
53
54    #[test]
55    fn shape_style_type() {
56        let name = "shape-outside";
57        crate::test_property_initial_value!(ShapeOutside, None);
58        crate::test_global_keywords!(ShapeOutside, name);
59        crate::test_function_var!(ShapeOutside, name);
60        #[cfg(feature = "atomic")]
61        crate::test_atomic_property!(ShapeOutside, "shape-o");
62    }
63}