-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple-layout.css
More file actions
114 lines (89 loc) · 1.69 KB
/
simple-layout.css
File metadata and controls
114 lines (89 loc) · 1.69 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
: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)
);
}
/* VERTICAL */
.vertical {
display: flex;
flex-direction: column;
}
.vertical > * {
flex: 0 1 auto;
}
/* HORIZONTAL */
.horizontal {
display: flex;
flex-direction: row;
}
.horizontal > * {
flex: 0 1 auto;
}
/* BAR */
.horizontal.bar,
.vertical.bar {
align-items: center;
justify-content: space-between;
}
/* GAPS */
.primary.grid,
.primary.vertical,
.primary.horizontal {
gap: var(--space-xl);
}
.secondary.grid,
.secondary.vertical,
.secondary.horizontal {
gap: var(--space-l);
}
/* TABLES */
th {
text-align: left;
}
td {
vertical-align: top;
}
th,
td {
padding: 0;
}
th:not(:last-child),
td:not(:last-child) {
padding-right: var(--space-m);
}
thead th,
tbody tr:not(:last-child) td {
padding-bottom: var(--space-m);
}