Skip to content

Commit 5088b55

Browse files
[Fix] CSS
1 parent 379a413 commit 5088b55

File tree

1 file changed

+60
-3
lines changed

1 file changed

+60
-3
lines changed

src/styles/global.css

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,21 @@
33
:root {
44
--font-family-sans: "Geist Sans", system-ui, -apple-system, sans-serif;
55
--font-family-mono: "Geist Mono", ui-monospace, monospace;
6-
--background: #0f0f0f;
6+
}
7+
8+
:root,
9+
.dark {
10+
color-scheme: dark;
11+
--background: #0a0a0a;
712
--foreground: #ededed;
813
}
914

15+
.light {
16+
color-scheme: light;
17+
--background: #ffffff;
18+
--foreground: #0a0a0a;
19+
}
20+
1021
* {
1122
scrollbar-width: thin;
1223
scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
@@ -31,7 +42,8 @@
3142
}
3243

3344
@keyframes heartbeat {
34-
0%, 100% {
45+
0%,
46+
100% {
3547
transform: scale(1);
3648
opacity: 0.9;
3749
}
@@ -138,4 +150,49 @@ a,
138150

139151
[class*="hover:shadow"] {
140152
isolation: isolate;
141-
}
153+
}
154+
155+
.scroll-animate {
156+
opacity: 0;
157+
will-change: transform, opacity;
158+
}
159+
160+
.scroll-animate-up {
161+
transform: translateY(30px);
162+
}
163+
164+
.scroll-animate-down {
165+
transform: translateY(-30px);
166+
}
167+
168+
.scroll-animate-left {
169+
transform: translateX(-30px);
170+
}
171+
172+
.scroll-animate-right {
173+
transform: translateX(30px);
174+
}
175+
176+
.scroll-animate-scale {
177+
transform: scale(0.95);
178+
}
179+
180+
html {
181+
scroll-behavior: smooth;
182+
}
183+
184+
@media (prefers-reduced-motion: reduce) {
185+
html {
186+
scroll-behavior: auto;
187+
}
188+
189+
.scroll-animate,
190+
.scroll-animate-up,
191+
.scroll-animate-down,
192+
.scroll-animate-left,
193+
.scroll-animate-right,
194+
.scroll-animate-scale {
195+
opacity: 1;
196+
transform: none;
197+
}
198+
}

0 commit comments

Comments
 (0)