polished_css/property/layout/
gap.rs1macro_rules! create_struct {
2 ($property:ident, $atomic:literal) => {
3 $crate::create_property!(
4 $property,
5 display = "",
6 atomic = $atomic,
7 custom = false,
8 data_type = "<length-percentage>",
9 initial_value = Normal,
10 keywords = "normal",
11 );
12 };
13}
14
15create_struct!(Gap, "gap");
16create_struct!(RowGap, "row");
17create_struct!(ColumnGap, "col");
18
19#[cfg(test)]
20mod test {
21 #[test]
22 fn gaps() {
23 macro_rules! test_property {
24 ($property:ident, $name:expr, $atomic:expr) => {
25 crate::test_property_initial_value!($property, Normal);
26 crate::test_global_keywords!($property, $name);
27 crate::test_function_var!($property, $name);
28 #[cfg(feature = "atomic")]
29 crate::test_atomic_property!($property, $atomic);
30 };
31 }
32 test_property!(Gap, "gap", "gap");
33 test_property!(RowGap, "row-gap", "row");
34 test_property!(ColumnGap, "column-gap", "col");
35 }
36}