-
Notifications
You must be signed in to change notification settings - Fork 15
/
style.css
60 lines (51 loc) · 880 Bytes
/
style.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
html, body {
height: 100%;
}
body, ul {
margin: 0;
}
ul {
display: grid;
height: 100%;
overflow: auto;
list-style: none;
will-change: opacity;
}
ul img {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
}
#thumbnails {
--columns: 7;
--gutter: 20px;
--size: calc((100vw - (var(--columns) + 1) * var(--gutter)) / var(--columns));
grid: auto-flow var(--size) / repeat(var(--columns), 1fr);
gap: var(--gutter);
padding: var(--gutter);
box-sizing: border-box;
}
@media (max-width: 450px) {
#thumbnails {
--columns: 3;
--gutter: 15px;
}
}
#scroller {
grid: 100% / auto-flow 100%;
scroll-snap-type: x mandatory;
padding: 0;
}
#scroller li {
scroll-snap-align: center;
scroll-snap-stop: always;
}
.hidden {
visibility: hidden;
}
@media (prefers-color-scheme: dark) {
body {
background: #000;
}
}