fix(docs): visible admonition icons in dark mode#551
Conversation
…ow-up) The asciidoctor stylesheet hardcodes dark admonition icon colors (note #19407c, tip LLM-Coding#111, important #bf0000, warning/caution dark warm tones) that nearly vanish on the dark #1f2937 panel — measured contrast 1.3-2.3:1, below the 3:1 WCAG threshold for non-text. Add dark-scoped overrides to light, semantic colours (note blue, tip green, warning amber, caution orange, important red); contrast now 5-8:1. Light mode unchanged. Note: Lighthouse reports Accessibility 100 but only audits the default (light) theme — dark mode is a class toggle it never triggers — so these dark-mode contrast issues are invisible to it. 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)
WalkthroughDark-Mode-CSS-Übersteuerungen wurden für Asciidoctor-Admonition-Icons hinzugefügt. Die ChangesAdmonition-Icon-Sichtbarkeit im Dark Mode
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 Minuten Possibly related PRs
🚥 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 |
Follow-up to #516 / #550.
Problem
After fixing the admonition body text in dark mode (#550), the admonition icons are still nearly invisible: the asciidoctor stylesheet hardcodes dark icon colours (note
#19407c, tip#111, important#bf0000, warning/caution dark warm tones) that sit on the dark#1f2937panel. Measured contrast 1.3–2.3:1, below the 3:1 WCAG threshold for non-text — the "i" note icon and the tip bulb in particular are barely there.Fix
.dark-scoped overrides lifting each icon to a light, semantic colour:#19407c#60a5fablue#111#4ade80green#bf0000#f87171red#bf6900#fbbf24amber#bf3400#fb923corangeLight mode unchanged (rules are
.dark-scoped).Note on Lighthouse
The site's dark mode is a class toggle (
.dark+ localStorage), notprefers-color-scheme. Lighthouse / the CI audit only ever sees the default light theme, so it reports Accessibility 100 while these dark-mode contrast failures go undetected. Verified here by computing WCAG contrast directly in dark mode.🤖 Generated with Claude Code
Summary by CodeRabbit