polished_css/property/typography/
font.rs

1crate::create_property!(
2    FontFamily,
3    display = "",
4    atomic = "font-f",
5    custom = false,
6    data_type = "<string>",
7    initial_value = Initial,
8    keywords = "",
9);
10
11crate::create_property!(
12    FontSize,
13    display = "",
14    atomic = "font-s",
15    custom = false,
16    data_type = "<length-percentage>",
17    initial_value = Initial,
18    keywords = "",
19);
20
21crate::create_property!(
22    FontWeight,
23    display = "",
24    atomic = "font-w",
25    custom = false,
26    data_type = "<number>",
27    initial_value = Initial,
28    keywords = "",
29);
30
31#[cfg(test)]
32mod test {
33    #[test]
34    fn font_family() {
35        let name = "font-family";
36        crate::test_property_initial_value!(FontFamily, Initial);
37        crate::test_global_keywords!(FontFamily, name);
38        crate::test_function_var!(FontFamily, name);
39        #[cfg(feature = "atomic")]
40        crate::test_atomic_property!(FontFamily, "font-f");
41    }
42
43    #[test]
44    fn font_size() {
45        let name = "font-size";
46        crate::test_property_initial_value!(FontSize, Initial);
47        crate::test_global_keywords!(FontSize, name);
48        crate::test_function_var!(FontSize, name);
49        #[cfg(feature = "atomic")]
50        crate::test_atomic_property!(FontSize, "font-s");
51    }
52
53    #[test]
54    fn font_weight() {
55        let name = "font-weight";
56        crate::test_property_initial_value!(FontWeight, Initial);
57        crate::test_global_keywords!(FontWeight, name);
58        crate::test_function_var!(FontWeight, name);
59        #[cfg(feature = "atomic")]
60        crate::test_atomic_property!(FontWeight, "font-w");
61    }
62}