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
use crate::{
style::Style,
value::{
layouts::{GridAuto, GridFlow, GridTemplate},
Unit,
},
};
pub struct GridStyle {
pub col: GridAuto,
pub col_gap: Unit,
pub flow: GridFlow,
pub row: GridAuto,
pub row_gap: Unit,
pub template_col: GridTemplate,
pub template_row: GridTemplate,
}
impl Into<[Style; 7]> for GridStyle {
fn into(self) -> [Style; 7] {
[
Style::GridAutoColumns(self.col),
Style::GridAutoRows(self.row),
Style::GridAutoFlow(self.flow),
Style::GridColumnGap(self.col_gap),
Style::GridRowGap(self.row_gap),
Style::GridTemplateColumns(self.template_col),
Style::GridTemplateRows(self.template_row),
]
}
}