-
Notifications
You must be signed in to change notification settings - Fork 2
/
grid.css
39 lines (34 loc) · 946 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
38
39
/* https://css-tricks.com/building-css-grid-overlay/ */
:root {
--grid-color: hsla(204, 75%, 75%, 0.25);
--grid-repeating-width: calc(100% / var(--columns));
--grid-column-width: calc((100% / var(--columns)) - var(--gutter));
--grid-background-width: calc(100% + var(--gutter));
--grid-background-columns: repeating-linear-gradient(
to right,
var(--grid-color),
var(--grid-color) var(--grid-column-width),
transparent var(--grid-column-width),
transparent var(--grid-repeating-width)
);
}
html {
position: relative;
}
html::before {
content: '';
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;
background-image: var(--grid-background-columns);
background-size: var(--grid-background-width) 100%;
z-index: 1000;
pointer-events: none;
}