Skip to content

Commit b1512ab

Browse files
raifdmuellerclaude
andcommitted
fix(docs): visible admonition icons in dark mode (#516 follow-up)
The asciidoctor stylesheet hardcodes dark admonition icon colors (note #19407c, tip #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>
1 parent 457c183 commit b1512ab

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

website/src/styles/main.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,26 @@ html {
411411
border-left-color: #374151;
412412
}
413413

414+
/* The asciidoctor stylesheet hardcodes dark admonition icon colors (note
415+
#19407c, tip #111, important #bf0000, …) that nearly vanish on the dark
416+
panel (contrast ~1.3-2.3:1, below the 3:1 needed for non-text). Lift each to
417+
a light, semantic colour for dark mode. (#516 follow-up) */
418+
.dark .asciidoc-content .admonitionblock td.icon .icon-note::before {
419+
color: #60a5fa;
420+
}
421+
.dark .asciidoc-content .admonitionblock td.icon .icon-tip::before {
422+
color: #4ade80;
423+
}
424+
.dark .asciidoc-content .admonitionblock td.icon .icon-warning::before {
425+
color: #fbbf24;
426+
}
427+
.dark .asciidoc-content .admonitionblock td.icon .icon-caution::before {
428+
color: #fb923c;
429+
}
430+
.dark .asciidoc-content .admonitionblock td.icon .icon-important::before {
431+
color: #f87171;
432+
}
433+
414434
.dark .asciidoc-content hr {
415435
border-color: #374151;
416436
}

0 commit comments

Comments
 (0)