Skip to content

Commit 0465990

Browse files
committed
fix: dark mode theme switching issue and ensure preview background updates
1 parent 5a5f2ed commit 0465990

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

src/app/globals.css

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,6 @@
4949
--font-mono: var(--font-geist-mono);
5050
}
5151

52-
@media (prefers-color-scheme: dark) {
53-
:root {
54-
--background: #0a0a0a;
55-
--foreground: #ededed;
56-
--card: #09090b;
57-
--card-foreground: #fafafa;
58-
--popover: #09090b;
59-
--popover-foreground: #fafafa;
60-
--primary: #fafafa;
61-
--primary-foreground: #18181b;
62-
--secondary: #27272a;
63-
--secondary-foreground: #fafafa;
64-
--muted: #27272a;
65-
--muted-foreground: #a1a1aa;
66-
--accent: #27272a;
67-
--accent-foreground: #fafafa;
68-
--destructive: #7f1d1d;
69-
--destructive-foreground: #fafafa;
70-
--border: #27272a;
71-
--input: #27272a;
72-
--ring: #d4d4d8;
73-
}
74-
}
75-
7652
.dark {
7753
--background: #0a0a0a;
7854
--foreground: #ededed;

src/components/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface PreviewProps {
1515

1616
export function MarkdownPreview({ content, className }: PreviewProps) {
1717
return (
18-
<div className={cn("h-full w-full overflow-y-auto p-4", className)}>
18+
<div className={cn("h-full w-full overflow-y-auto p-4 bg-background text-foreground transition-colors duration-200", className)}>
1919
<article className="prose dark:prose-invert max-w-none prose-pre:bg-transparent prose-pre:p-0">
2020
<ReactMarkdown
2121
remarkPlugins={[remarkGfm, remarkMath]}

0 commit comments

Comments
 (0)