Skip to content

Comments

feat: add dark mode support for markdown code blocks#144

Merged
rgbkrk merged 2 commits intomainfrom
rgbkrk/markdown-dark-mode
Feb 14, 2026
Merged

feat: add dark mode support for markdown code blocks#144
rgbkrk merged 2 commits intomainfrom
rgbkrk/markdown-dark-mode

Conversation

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Feb 14, 2026

Summary

  • Switch between light and dark syntax highlighting themes based on system preference
  • Add dark: Tailwind variants to all markdown elements
  • Include visual documentation examples for testing theme adaptation

Changes

  • Markdown code blocks now adapt background color and syntax highlighting
  • Inline code, tables, links, blockquotes, and other elements now have proper dark mode styling
  • Added useDarkMode() hook to watch for theme changes via MutationObserver and media query
  • Documentation includes interactive examples demonstrating theme switching

Test Plan

  • Navigate to /docs/outputs/markdown-output
  • Toggle site theme in header and verify code blocks adapt
  • Verify inline code background/text colors change
  • Verify table styling adapts to theme
  • Verify copy button is visible and styled in both modes
  • Test with browser prefers-color-scheme emulation

Switch between light and dark syntax highlighting themes based on system preference or site theme setting. Add dark: Tailwind variants to all markdown elements (inline code, tables, links, blockquotes, etc.). Include visual documentation examples for testing theme adaptation.
@vercel
Copy link

vercel bot commented Feb 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nteract-elements Ready Ready Preview, Comment Feb 14, 2026 3:05am

Request Review

@rgbkrk rgbkrk merged commit 0fd94ce into main Feb 14, 2026
5 checks passed
@rgbkrk rgbkrk deleted the rgbkrk/markdown-dark-mode branch February 14, 2026 03:07
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.

1 participant