feat: 默认跟随系统主题和浏览器语言

This commit is contained in:
Nixevol
2026-07-05 02:05:53 +08:00
parent 4dc9528397
commit 76bdf4fa3f
7 changed files with 53 additions and 9 deletions
+20 -2
View File
@@ -2,8 +2,26 @@
--brand: #1f3864;
--brand-2: #2e5496;
--bg: #f3f5f9;
--card-bg: #fff;
--soft-bg: #f6f8fb;
--border: #d0d7e2;
--text: #1f2937;
--muted: #6b7280;
--shell-shadow: 0 0 24px rgba(0, 0, 0, 0.04);
}
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--brand: #7dd3fc;
--brand-2: #5eead4;
--bg: #0f172a;
--card-bg: #111827;
--soft-bg: #1f2937;
--border: #334155;
--text: #e5e7eb;
--muted: #94a3b8;
--shell-shadow: 0 0 24px rgba(0, 0, 0, 0.24);
}
}
* {
box-sizing: border-box;
@@ -26,10 +44,10 @@ body,
min-height: 100vh;
background: var(--bg);
position: relative;
box-shadow: 0 0 24px rgba(0, 0, 0, 0.04);
box-shadow: var(--shell-shadow);
}
.card {
background: #fff;
background: var(--card-bg);
border-radius: 14px;
margin: 12px;
padding: 16px;