We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb19407 commit 1e547d4Copy full SHA for 1e547d4
.changeset/eight-laws-find.md
@@ -0,0 +1,5 @@
1
+---
2
+"streamdown": patch
3
4
+
5
+Fix code blocks in dark mode
packages/streamdown/lib/code-block/body.tsx
@@ -35,7 +35,7 @@ export const CodeBlockBody = memo(
35
36
return (
37
<pre
38
- className={cn(className, "p-4 text-sm")}
+ className={cn(className, "p-4 text-sm dark:bg-(--shiki-dark-bg)!")}
39
data-code-block
40
data-language={language}
41
style={preStyle}
@@ -50,6 +50,7 @@ export const CodeBlockBody = memo(
50
>
51
{row.map((token, tokenIndex) => (
52
<span
53
+ className="dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!"
54
// biome-ignore lint/suspicious/noArrayIndexKey: "This is a stable key."
55
key={tokenIndex}
56
style={{
0 commit comments