-
Notifications
You must be signed in to change notification settings - Fork 66
Change svg background color for dark mode #415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #415 +/- ##
=======================================
Coverage 77.56% 77.56%
=======================================
Files 16 16
Lines 4217 4217
=======================================
Hits 3271 3271
Misses 946 946 Continue to review full report at Codecov.
|
Somehow this doesn't actually work yet, my guess is that the styles in tag In README: In https://github.com/pygae/galgebra/blob/master/doc/module-components.rst#latex-printing :
|
Is this a problem just for the readme, or the Sphinx docs too? |
Currently only for .md and .rst in Github Dark theme . |
https://github.com/StylishThemes/GitHub-Dark
|
What I usually do in these cases is create a rectangle for the background, with the same dimensions as the svg document/viewport. For example, for </defs>
+<rect width="400" height="375" fill="#fcfcfc"/>
<g id="surface1"> May I ask why use Also, note that the contents of the SVG files are immediately adjacent to its margins, so a white fill would still not look good in a dark background. You'd need some sort of margin, e.g.: <?xml version="1.0" encoding="UTF-8"?>
-<svg ... width="400pt" height="375pt" viewBox="0 0 400 375" version="1.1">
+<svg ... width="400pt" height="375pt" viewBox="-10 10 420 395" version="1.1">
<defs>
...
</defs>
+<rect x="-10" y="-10" width="420" height="395" fill="#fcfcfc"/>
<g id="surface1">
...
</g>
</svg> |
Using |
Thanks for the suggestion. Why I'm hesitating is that this method is too manual, although not much of trouble. |
Could alternatively fix this with StylishThemes/GitHub-Dark#1060, which is what makes this work: Edit: #418 is a failed attempt at this |
Sounds like a bug you should report back to Github-Dark. |
Indeed, will do that instead. |
Superseded by #503 |
No description provided.