Skip to content

fix(docs): readable admonition text in dark mode (#516)#550

Merged
rdmueller merged 1 commit into
LLM-Coding:mainfrom
raifdmueller:fix/dark-admonition-contrast
Jun 1, 2026
Merged

fix(docs): readable admonition text in dark mode (#516)#550
rdmueller merged 1 commit into
LLM-Coding:mainfrom
raifdmueller:fix/dark-admonition-contrast

Conversation

@raifdmueller
Copy link
Copy Markdown
Contributor

@raifdmueller raifdmueller commented Jun 1, 2026

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 to var(--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).

.dark .asciidoc-content .admonitionblock > table td.content {
  color: var(--color-text);
  border-left-color: #374151;
}

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

  • Bugfixes
    • Verbesserte Darstellung von Warn- und Hinweisblöcken im Dark Mode für bessere Textlesbarkeit und konsistente visuelle Darstellung in Tabellen.

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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: e08a5e39-9059-4251-bfa0-b84a8f03fd7d

📥 Commits

Reviewing files that changed from the base of the PR and between 05d0c75 and bb14588.

📒 Files selected for processing (1)
  • website/src/styles/main.css

Walkthrough

Die Pull Request fügt eine gezielt CSS-Überschreibung in der Dark-Mode-Section von main.css hinzu. Die neue Regel korrigiert die Lesbarkeit von Asciidoctor-Admonition-Blöcken (Warnungen und Hinweise) im dunklen Modus, indem Textfarbe und Border-Styling auf korrekte Kontrastverhältnisse angepasst werden.

Changes

Dark-Mode-Styling-Korrektur

Layer / File(s) Zusammenfassung
Dark-Mode-Überschreibung für Asciidoctor-Admonitions
website/src/styles/main.css
CSS-Selektor .admonitionblock td.content wird in Dark Mode hinzugefügt: Textfarbe wird auf var(--color-text) gesetzt und die linke Border-Farbe auf #374151 angepasst, um dunkle Text-Lesbarkeit auf dunklem Hintergrund zu korrigieren.

🎯 1 (Trivial) | ⏱️ ~2 Minuten

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Der Titel beschreibt präzise die Hauptänderung: Behebung der Lesbarkeit von Admonition-Text im Dark Mode durch CSS-Anpassungen.
Linked Issues check ✅ Passed Die CSS-Änderungen beheben direkt das in #516 gemeldete Problem durch Überschreibung der Textfarbe in Dark Mode auf var(--color-text).
Out of Scope Changes check ✅ Passed Die Änderung ist ausschließlich auf die Dark-Mode-CSS-Korrektur für Admonition-Blöcke beschränkt und vollständig im Scope von Issue #516.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rdmueller rdmueller merged commit 457c183 into LLM-Coding:main Jun 1, 2026
7 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.

[Bug]: unreadable intro in dark mode

2 participants