Skip to content

Commit 6c7d448

Browse files
committed
fix(markdown): restore text-foreground on code/pre in light mode
1 parent b423387 commit 6c7d448

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/MarkdownContent.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const components: Components = {
88
pre: ({ children, ...props }) => (
99
<pre
1010
{...props}
11-
className="overflow-x-auto max-w-full rounded bg-code px-3 py-2 text-xs font-mono"
11+
className="overflow-x-auto max-w-full rounded bg-code px-3 py-2 text-xs font-mono text-foreground"
1212
>
1313
{children}
1414
</pre>
@@ -17,7 +17,7 @@ const components: Components = {
1717
code: ({ children, ...props }) => (
1818
<code
1919
{...props}
20-
className="break-all rounded bg-code px-1 py-0.5 text-xs font-mono"
20+
className="break-all rounded bg-code px-1 py-0.5 text-xs font-mono text-foreground"
2121
>
2222
{children}
2323
</code>
@@ -53,7 +53,7 @@ interface MarkdownContentProps {
5353

5454
export default function MarkdownContent({ children }: MarkdownContentProps) {
5555
return (
56-
<div className="prose prose-sm max-w-none overflow-hidden [overflow-wrap:break-word] dark:prose-invert">
56+
<div className="prose prose-sm max-w-none overflow-hidden [overflow-wrap:break-word] dark:prose-invert prose-pre:text-foreground prose-code:text-foreground">
5757
<ReactMarkdown remarkPlugins={[remarkGfm]} components={components}>
5858
{children}
5959
</ReactMarkdown>

0 commit comments

Comments
 (0)