-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple-layout.css
More file actions
89 lines (70 loc) · 1.38 KB
/
simple-layout.css
File metadata and controls
89 lines (70 loc) · 1.38 KB
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
80
81
82
83
84
85
86
87
88
89
:root {
--container-max-width: 1280px;
--space-xs: 0.25rem;
--space-s: 0.5rem;
--space-m: 1rem;
--space-l: 2rem;
--space-xl: 4rem;
--space-xxl: 6rem;
--primary-grid-column-min-width: 12rem;
--secondary-grid-column-min-width: 12rem;
}
/* CONTAINER */
/* horizontal container sizing
width: 100% first = fluid base so max-width can clamp cleanly
(prevents horizontal overflow on any screen < 1280 px) */
.container {
margin: 0 auto;
width: 100%;
max-width: min(var(--container-max-width), 90vw);
}
/* GRID */
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
.primary.grid {
grid-template-columns: repeat(
auto-fit,
minmax(var(--primary-grid-column-min-width), 1fr)
);
}
.secondary.grid {
grid-template-columns: repeat(
auto-fit,
minmax(var(--secondary-grid-column-min-width), 1fr)
);
}
/* COLUMN */
.column {
display: flex;
flex-direction: column;
}
.column > * {
flex: 0 1 auto;
}
/* ROW */
.row {
display: flex;
flex-direction: row;
}
.row > * {
flex: 0 1 auto;
}
/* BAR */
.bar.row,
.bar.column {
align-items: center;
justify-content: space-between;
}
/* GAPS */
.primary.grid,
.primary.column,
.primary.row {
gap: var(--space-xl);
}
.secondary.grid,
.secondary.column,
.secondary.row {
gap: var(--space-l);
}