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
use crate::{Style, StyleUpdater};
#[derive(Clone, Debug, Copy, PartialEq, Eq, Display, From)]
pub enum Display {
#[display(fmt = "inline")]
Inline,
#[display(fmt = "block")]
Block,
#[display(fmt = "contents")]
Contents,
#[display(fmt = "flex")]
Flex,
#[display(fmt = "grid")]
Grid,
#[display(fmt = "inline-block")]
InlineBlock,
#[display(fmt = "inline-flex")]
InlineFlex,
#[display(fmt = "inline-grid")]
InlineGrid,
#[display(fmt = "inline-table")]
InlineTable,
#[display(fmt = "list-item")]
ListItem,
#[display(fmt = "run-in")]
RunIn,
#[display(fmt = "table")]
Table,
#[display(fmt = "table-caption")]
TableCaption,
#[display(fmt = "table-column-group")]
TableColumnGroup,
#[display(fmt = "table-header-group")]
TableHeaderGroup,
#[display(fmt = "table-footer-group")]
TableFooterGroup,
#[display(fmt = "table-row-group")]
TableRowGroup,
#[display(fmt = "table-cell")]
TableCell,
#[display(fmt = "table-column")]
TableColumn,
#[display(fmt = "table-row")]
TableRow,
#[display(fmt = "none")]
None,
#[display(fmt = "initial")]
Initial,
#[display(fmt = "inherit")]
Inherit,
}
impl StyleUpdater for Display {
fn update_style(self, style: Style) -> Style {
style.insert("display", self)
}
}