Commit 52f7de9
fix(a11y): add dark-theme overrides for hardcoded light-theme colours
The recent BITV contrast fixes hardcoded colours that were chosen for
the white (light) background. The sphinx-rtd-dark-mode plugin switches
the content background to ~#141414 and code bg to #2d2d2d, making
those values fail WCAG AA in dark mode:
- .rst-content a: #2474a4 → 3.6:1 on #141414 (needs 4.5:1)
Also silently overrides the plugin's --dark-link-color variable.
- code color: #c0392b !important → 2.4:1 on #2d2d2d (needs 4.5:1)
The !important fully defeats the plugin's dark-mode rule.
- .wy-form-search-icon: #555 → ~1.7:1 on #0b152d sidebar (invisible)
Add html[data-theme="dark"] overrides that restore proper contrast
without touching the existing light-theme rules:
- Links: defer to var(--dark-link-color, #249ee8) (~6.1:1)
- Inline code: #ff7878 (~4.9:1 on #2d2d2d)
- Search icon: #aaa
Closes #14831
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>1 parent edc929d commit 52f7de9
1 file changed
Lines changed: 25 additions & 0 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
156 | 181 | | |
157 | 182 | | |
158 | 183 | | |
| |||
0 commit comments