polished_css/property/layout/
position.rs

1crate::create_property!(
2    Position,
3    display = "",
4    atomic = "pos",
5    custom = false,
6    data_type = "",
7    initial_value = Static,
8    keywords = "static,relative,absolute,sticky,fixed",
9);
10
11crate::create_property!(
12    ZIndex,
13    display = "",
14    atomic = "z",
15    custom = false,
16    data_type = "<integer>",
17    initial_value = Initial,
18    keywords = "",
19);
20
21#[cfg(test)]
22mod test {
23    #[test]
24    fn position() {
25        let name = "position";
26        crate::test_property_initial_value!(Position, Static);
27        crate::test_global_keywords!(Position, name);
28        crate::test_function_var!(Position, name);
29        #[cfg(feature = "atomic")]
30        crate::test_atomic_property!(Position, "pos");
31    }
32
33    #[test]
34    fn z_index() {
35        let name = "z-index";
36        crate::test_property_initial_value!(ZIndex, Initial);
37        crate::test_global_keywords!(ZIndex, name);
38        crate::test_function_var!(ZIndex, name);
39        #[cfg(feature = "atomic")]
40        crate::test_atomic_property!(ZIndex, "z");
41    }
42}