Skip to content

fix: make code blocks respond to dark mode theme toggle#200

Merged
braboj merged 1 commit into
mainfrom
fix/dark-mode-code-blocks
Apr 26, 2026
Merged

fix: make code blocks respond to dark mode theme toggle#200
braboj merged 1 commit into
mainfrom
fix/dark-mode-code-blocks

Conversation

@braboj

@braboj braboj commented Apr 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add --color-code-bg and --color-code-fg CSS variables to both light and dark themes
  • Replace hardcoded #1e1e1e / #e0e0e0 in .content pre with the new variables
  • Light mode: #f5f5f5 bg / #212121 text — distinct from white page background
  • Dark mode: #2a2a2a bg / #e0e0e0 text — distinct from #1e1e1e page background
  • Closes Fix dark mode styling for code blocks #159

Test plan

  • Toggle between light and dark mode — code blocks should visually adapt
  • Code blocks have clear contrast against the page background in both themes
  • CI passes

Replace hardcoded colors in .content pre with CSS variables
(--color-code-bg, --color-code-fg) that adapt to the selected theme.

Closes #159

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@braboj braboj merged commit e0ab4b1 into main Apr 26, 2026
1 check passed
@braboj braboj deleted the fix/dark-mode-code-blocks branch April 26, 2026 10:28
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.

Fix dark mode styling for code blocks

1 participant