feat: support dark mode

This commit is contained in:
Li Xin
2025-04-20 11:18:05 +08:00
parent ce130e7160
commit a57db4fa4a
18 changed files with 952 additions and 53 deletions

View File

@@ -55,10 +55,13 @@
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
--color-app: var(--app-background);
--color-brand: var(--brand);
}
:root {
--radius: 0.625rem;
--app-background: #f7f5f3;
--background: oklch(1 0 0);
--foreground: rgba(0, 0, 0, 0.72);
--card: oklch(1 0 0);
@@ -90,10 +93,12 @@
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
--brand: #007aff;
}
.dark {
--background: oklch(0.145 0 0);
--app-background: var(--background);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
@@ -124,6 +129,7 @@
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
--brand: #4087f4;
}
@layer base {
@@ -131,7 +137,7 @@
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
@apply text-foreground;
}
}
@@ -144,7 +150,10 @@ textarea {
line-height: 1.75;
a {
color: blue;
text-decoration: underline;
text-decoration-style: dotted;
text-underline-position: from-font;
text-decoration-color: var(--muted-foreground);
&:hover {
text-decoration: underline;