1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
use phf;
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types)]
pub enum PropertyName {
LEFT,
RIGHT,
TOP,
BOTTOM,
HEIGHT,
WIDTH,
MARGIN,
MARGIN_LEFT,
MARGIN_RIGHT,
MARGIN_TOP,
MARGIN_BOTTOM,
PADDING,
PADDING_LEFT,
PADDING_RIGHT,
PADDING_TOP,
PADDING_BOTTOM,
BORDER,
BORDER_LEFT,
BORDER_RIGHT,
BORDER_TOP,
BORDER_BOTTOM,
LAYOUT_MODE,
BACKGROUND_IMAGE_RULE,
BACKGROUND_IMAGE,
}
pub static STYLE_PROPERTIES: phf::Map<&'static str, PropertyName> = phf_map! {
"left" => PropertyName::LEFT,
"right" => PropertyName::RIGHT,
"top" => PropertyName::TOP,
"bottom" => PropertyName::BOTTOM,
"height" => PropertyName::HEIGHT,
"width" => PropertyName::WIDTH,
"margin" => PropertyName::MARGIN,
"margin-left" => PropertyName::MARGIN_LEFT,
"margin-right" => PropertyName::MARGIN_RIGHT,
"margin-top" => PropertyName::MARGIN_TOP,
"margin-bottom" => PropertyName::MARGIN_BOTTOM,
"padding" => PropertyName::PADDING,
"padding-left" => PropertyName::PADDING_LEFT,
"padding-right" => PropertyName::PADDING_RIGHT,
"padding-top" => PropertyName::PADDING_TOP,
"padding-bottom" => PropertyName::PADDING_BOTTOM,
"border" => PropertyName::BORDER,
"border-left" => PropertyName::BORDER_LEFT,
"border-right" => PropertyName::BORDER_RIGHT,
"border-top" => PropertyName::BORDER_TOP,
"border-bottom" => PropertyName::BORDER_BOTTOM,
"layout" => PropertyName::LAYOUT_MODE,
"background-image" => PropertyName::BACKGROUND_IMAGE,
"background-image-rule" => PropertyName::BACKGROUND_IMAGE_RULE,
};