Skip to content

fix(editor): improve dark theme contrast - #602

Merged
murongg merged 2 commits into
v2from
fix/issue-601-editor-contrast
Jul 29, 2026
Merged

fix(editor): improve dark theme contrast#602
murongg merged 2 commits into
v2from
fix/issue-601-editor-contrast

Conversation

@murongg

@murongg murongg commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • make Markdown markers and CodeMirror selections readable in source and preview modes across built-in dark themes
  • add theme-aware Markdown metadata and JSON token highlighting instead of CodeMirror's light-theme fallback colors
  • raise low-contrast secondary text tokens in Dark, One Dark, and One Dark Pro, including independently selected editor paper themes
  • cover the affected syntax, selection, and theme combinations with regression tests

Why

The v2.1.0 syntax-muted styling blended structural Markdown markers too close to dark editor backgrounds. CodeMirror also applied light-theme syntax and selection fallbacks to source metadata and the custom headers JSON editor. One Dark's secondary text tokens were additionally too dim for settings descriptions and editor annotations.

Closes #601

Validation

  • pnpm --filter @markra/app test — 129 files and 1458 tests passed
  • pnpm --filter @markra/editor test — 33 files and 357 tests passed
  • pnpm --filter @markra/editor typecheck:test — passed
  • pnpm --filter @markra/app typecheck:test — passed
  • pnpm --filter @markra/web build — passed
  • git diff --check — passed
  • contrast spot checks: Dark secondary text 4.52:1; One Dark secondary text 4.71:1; Solarized Dark markers 5.61:1

Risk

  • Medium-low: the behavior is limited to editor highlighting, selection colors, and dark-theme text tokens. One Dark secondary text is intentionally brighter, so muted UI text will have less visual separation from primary text.

Screenshots

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
markra-web Ready Ready Preview, Comment Jul 29, 2026 4:08am

@murongg
murongg merged commit e44cce5 into v2 Jul 29, 2026
21 checks passed
@murongg
murongg deleted the fix/issue-601-editor-contrast branch July 29, 2026 04:17
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.

[Bug]: 深色模式下源码模式语法符号与背景对比度过低,无法看清

1 participant