-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
98 lines (88 loc) · 2.26 KB
/
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
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
@property --scroll-percentage {
syntax: "<length-percentage>";
inherits: false;
initial-value: 0;
}
@layer base, animations;
@layer base {
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgb(255 255 255 / 87%);
font-synthesis: none;
text-rendering: optimizelegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
min-height: 100vh;
}
main {
max-width: 80ch;
margin: 0 auto;
padding: 1rem;
color: lightgray;
}
}
@layer animations {
:root {
--can-scroll: 0;
animation: detect-scroll;
animation-duration: 1ms;
animation-iteration-count: infinite;
animation-timeline: scroll(self);
animation-direction: normal;
animation-timing-function: linear;
body {
background: radial-gradient(
circle at var(--scroll-percentage) var(--scroll-percentage),
hsl(0deg 100% 10%),
transparent 50%
),
radial-gradient(
circle at calc(100% - var(--scroll-percentage))
var(--scroll-percentage),
hsl(90deg 100% 10%),
transparent 50%
),
radial-gradient(
circle at calc(100% - var(--scroll-percentage))
calc(100% - var(--scroll-percentage)),
hsl(180deg 100% 10%),
transparent 50%
),
radial-gradient(
circle at var(--scroll-percentage)
calc(100% - var(--scroll-percentage)),
hsl(270deg 100% 10%),
transparent 50%
);
animation: background-position-diagonal;
animation-duration: 15s;
animation-iteration-count: infinite;
animation-timeline: auto;
animation-direction: alternate;
animation-timing-function: cubic-bezier(0, 0.25, 1, 0.75);
}
@container style(--can-scroll: 1) {
body {
animation-duration: unset;
animation-timeline: scroll(y root);
animation-iteration-count: unset;
}
}
}
@keyframes detect-scroll {
to {
--can-scroll: 1;
}
}
@keyframes background-position-diagonal {
from {
--scroll-percentage: 0%;
}
to {
--scroll-percentage: 100%;
}
}
}