Skip to content
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

set white background on SVGs #131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

set white background on SVGs #131

wants to merge 1 commit into from

Conversation

stuij
Copy link
Member

@stuij stuij commented Mar 14, 2022

Previously the background of the SVGs was transparent, which makes the diagrams
hard to read on Github when the dark theme is enabled.

This should fix #125.

Previously the background of the SVGs was transparent, which makes the diagrams
hard to read on Github when the dark theme is enabled.
@stuij
Copy link
Member Author

stuij commented Mar 14, 2022

Currently I've only fixed this on one SVG by drawing a white rectangle behind the diagram in Inkscape. I put this up publicly to check if there isn't a better/smarter way of doing this before I change al the other SVGs.

@statham-arm
Copy link
Contributor

Yes, I noticed this last week as well. It's frustrating to have to fix it this way, because you'd like the images to adapt to light vs dark mode in the same way that the text does! If only SVG had some kind of colour specification along the lines of 'pick whichever of white and black is more visible against the current background'.

I suppose the obvious thing to do would be to reuse the CSS colour specifications that apply to the text, for the appropriate elements of the SVG diagrams. But that is surely more trouble than it's worth, for at least two reasons.

Firstly, it's a generality problem. The CSS in question is specific to viewing these SVGs on Github, and would be useless in any of the other contexts that the SVGs in this git repo will be used – perhaps even harmful, if the context happened to define the same CSS class name for some other purpose.

Secondly, it makes editing the SVGs even more painful, because surely Inkscape would not be well set up to work effectively with strange abstract colour references like that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some images are difficult to see in dark mode
2 participants