-
Notifications
You must be signed in to change notification settings - Fork 5
/
grid.css
37 lines (35 loc) · 907 Bytes
/
grid.css
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
:root {
--offset: 20px;
--max_width: 1200px;
--columns: 12;
--gutter: 20px;
--color: hsla(204, 80%, 72%, 0.25);
--repeating-width: calc(100% / var(--columns));
--column-width: calc((100% / var(--columns)) - var(--gutter));
--background-width: calc(100% + var(--gutter));
--background-columns: repeating-linear-gradient(
to right,
var(--color),
var(--color) var(--column-width),
transparent var(--column-width),
transparent var(--repeating-width)
);
}
/* Styling */
html {
position: relative;
}
html::before {
position: absolute;
top: 0; right: 0; bottom: 0; left: 0;
margin-right: auto;
margin-left: auto;
width: calc(100% - (2 * var(--offset)));
max-width: var(--max_width);
min-height: 100vh;
content: '';
background-image: var(--background-columns);
background-size: var(--background-width) 100%;
z-index: 1000;
pointer-events: none;
}