polished_css/property/layout/
mod.rs

1pub mod r#box;
2pub mod dimension;
3pub mod display;
4pub mod flex;
5pub mod gap;
6pub mod grid;
7pub mod inset;
8pub mod margin;
9pub mod padding;
10pub mod placement;
11pub mod position;
12
13pub use dimension::*;
14pub use display::*;
15pub use flex::*;
16pub use gap::*;
17pub use grid::*;
18pub use inset::*;
19pub use margin::*;
20pub use padding::*;
21pub use placement::*;
22pub use position::*;
23pub use r#box::*;
24
25crate::create_property!(
26    AspectRatio,
27    display = "",
28    atomic = "ratio",
29    custom = false,
30    data_type = "<ratio>",
31    initial_value = Auto,
32    keywords = "auto",
33);
34
35crate::create_property!(
36    VerticalAlign,
37    display = "",
38    atomic = "v-align",
39    custom = false,
40    data_type = "<length-percentage>",
41    initial_value = Baseline,
42    keywords = "baseline,sub,super,text-top,text-bottom,middle,top,bottom",
43);
44
45crate::create_property!(
46    Resize,
47    display = "",
48    atomic = "resize",
49    custom = false,
50    data_type = "",
51    initial_value = None,
52    keywords = "none,both,horizontal,vertical,block,inline",
53);
54
55#[cfg(test)]
56mod test {
57    #[test]
58    fn aspect_ratio() {
59        let name = "aspect-ratio";
60        crate::test_property_initial_value!(AspectRatio, Auto);
61        crate::test_global_keywords!(AspectRatio, name);
62        crate::test_function_var!(AspectRatio, name);
63        #[cfg(feature = "atomic")]
64        crate::test_atomic_property!(AspectRatio, "ratio");
65    }
66
67    #[test]
68    fn resize() {
69        let name = "resize";
70        crate::test_property_initial_value!(Resize, None);
71        crate::test_global_keywords!(Resize, name);
72        crate::test_function_var!(Resize, name);
73        #[cfg(feature = "atomic")]
74        crate::test_atomic_property!(Resize, "resize");
75    }
76
77    #[test]
78    fn vertical_align() {
79        let name = "vertical-align";
80        crate::test_property_initial_value!(VerticalAlign, Baseline);
81        crate::test_global_keywords!(VerticalAlign, name);
82        crate::test_function_var!(VerticalAlign, name);
83        #[cfg(feature = "atomic")]
84        crate::test_atomic_property!(VerticalAlign, "v-align");
85    }
86}