1use crate::{Style, StyleUpdater};
2
3#[derive(Clone, Debug, Copy, PartialEq, Eq, Display, From)]
4pub enum Display {
5 #[display(fmt = "inline")]
6 Inline,
7 #[display(fmt = "block")]
8 Block,
9 #[display(fmt = "contents")]
10 Contents,
11 #[display(fmt = "flex")]
12 Flex,
13 #[display(fmt = "grid")]
14 Grid,
15 #[display(fmt = "inline-block")]
16 InlineBlock,
17 #[display(fmt = "inline-flex")]
18 InlineFlex,
19 #[display(fmt = "inline-grid")]
20 InlineGrid,
21 #[display(fmt = "inline-table")]
22 InlineTable,
23 #[display(fmt = "list-item")]
24 ListItem,
25 #[display(fmt = "run-in")]
26 RunIn,
27 #[display(fmt = "table")]
28 Table,
29 #[display(fmt = "table-caption")]
30 TableCaption,
31 #[display(fmt = "table-column-group")]
32 TableColumnGroup,
33 #[display(fmt = "table-header-group")]
34 TableHeaderGroup,
35 #[display(fmt = "table-footer-group")]
36 TableFooterGroup,
37 #[display(fmt = "table-row-group")]
38 TableRowGroup,
39 #[display(fmt = "table-cell")]
40 TableCell,
41 #[display(fmt = "table-column")]
42 TableColumn,
43 #[display(fmt = "table-row")]
44 TableRow,
45 #[display(fmt = "none")]
46 None,
47 #[display(fmt = "initial")]
48 Initial,
49 #[display(fmt = "inherit")]
50 Inherit,
51}
52
53impl StyleUpdater for Display {
54 fn update_style(self, style: Style) -> Style {
55 style.insert("display", self)
56 }
57}