Skip to content

fix(streamdown): correct CSS bracket syntax in code-block bg classes - #518

Merged
farnabaz merged 1 commit into
vercel:mainfrom
Qiuhang817385:fix/code-block-css-syntax
Aug 12, 2026
Merged

fix(streamdown): correct CSS bracket syntax in code-block bg classes#518
farnabaz merged 1 commit into
vercel:mainfrom
Qiuhang817385:fix/code-block-css-syntax

Conversation

@Qiuhang817385

Copy link
Copy Markdown
Contributor

Summary

Fix CSS bracket syntax errors in code-block/body.tsx where Tailwind classes for background color were missing closing brackets, causing invalid class names to be generated.

  • bg-[var(--sdm-bg,inherit]bg-[var(--sdm-bg,inherit)]
  • dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]

Test plan

  • Verify dark mode background fallback works correctly when Shiki does not provide --shiki-dark-bg
  • Verify light mode background still works (backed by inline CSS variables)

@vercel

vercel Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

@Qiuhang817385 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@farnabaz
farnabaz force-pushed the fix/code-block-css-syntax branch 2 times, most recently from 975100f to a33386c Compare August 12, 2026 14:40
Missing closing bracket on bg-[var(--sdm-bg,inherit)] and extra
closing bracket on dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]
caused Tailwind to generate invalid class names, breaking dark mode
background fallback.

Co-authored-by: Qiuhang817385 <826266129@QQ.COM>
@farnabaz
farnabaz force-pushed the fix/code-block-css-syntax branch from a33386c to 29bfc00 Compare August 12, 2026 14:40

@farnabaz farnabaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@farnabaz
farnabaz merged commit 9e571df into vercel:main Aug 12, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants