Commit 1235df5
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 8445847 commit 1235df5
1 file changed
Lines changed: 25 additions & 0 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
167 | 192 | | |
168 | 193 | | |
169 | 194 | | |
| |||
0 commit comments