fix(docs): readable admonition text in dark mode (#516)#550
Conversation
AsciiDoc admonition bodies hardcode color: rgba(0,0,0,.6) from the asciidoctor stylesheet. The dark-mode override only darkened the block background, leaving black text on a dark (#1f2937) panel — effectively unreadable (contrast ~1.1:1), e.g. the "Working on an existing codebase?" note on the Spec-Driven Development page. Override the admonition content text to var(--color-text) and darken its left divider for dark mode. Light mode is unchanged (rule is .dark-scoped). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughDie Pull Request fügt eine gezielt CSS-Überschreibung in der Dark-Mode-Section von ChangesDark-Mode-Styling-Korrektur
🎯 1 (Trivial) | ⏱️ ~2 Minuten 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #516.
Problem
On rendered AsciiDoc doc pages (e.g. Spec-Driven Development), admonition callouts show black text on a dark panel in dark mode — effectively unreadable. The asciidoctor stylesheet hardcodes the admonition body to
color: rgba(0, 0, 0, .6); the existing dark-mode override only set the block background to#1f2937, so the text stayed black (measured contrast ~1.1:1).Fix
Add a
.dark-scoped rule overriding the admonition content text tovar(--color-text)(and its light left divider to#374151). Dark-mode contrast goes to ~13:1. Light mode is untouched (the rule is.dark-scoped).Verification
Built + previewed the Spec-Driven Development page in dark mode: the "Working on an existing codebase?" note body now renders near-white (
rgb(249,250,251)) on the dark panel — measured via computed styles. The bold lead and inline text inherit the fix; links were already blue/visible.🤖 Generated with Claude Code
Summary by CodeRabbit