Commit 7908977
authored
fix: give SVG images a white background in dark mode (#642)
We recently introduced dark mode. SVG images often have dark text on
transparent backgrounds, making them invisible when the page background
is dark.
As a workaround, add a white backdrop via CSS on SVGs (by file
extension). There may be better fixes here, but this works well in my
testing and requires no action from contributors (e.g. multiple images).
Before/after:
<img width="913" height="427" alt="image"
src="https://github.com/user-attachments/assets/9fd6fbf5-c609-45f8-a8a8-581e2889b651"
/>
<img width="913" height="427" alt="image"
src="https://github.com/user-attachments/assets/97bd46ba-2d02-4b05-9dd2-56e021040245"
/>1 parent 113a75b commit 7908977
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
145 | 154 | | |
146 | 155 | | |
147 | 156 | | |
| |||
0 commit comments