New changes to the way Github renders svg images in README.md docs and a cry for help with fixing them.
In the past few days, the exact date I am unsure of, I noticed changes in the way GitHub handles svg images in repository README.md documents.
I have checked in multiple browsers but they all render the same so I'm sure it is something with GitHub as I most certainly did not make any changes to the README's .... they just up and changed.
A bit of a backstory...
Many moons ago, I was looking for a way to add svg icons to my README documents but I could not find any way to include the svg while changing its colour properties.
So I did the only thing any sane person would do and I created a GITSTRAP REPOSITORY that included all of the Bootstrap Icons ... in a variety of colours.
This way I (or anyone) could just include the pre-coloured icon into their README doc without much fuss.
For example, if you wanted the arrow-through-heart icon, but you wanted it red you would use:
<img width="100" height="100" src="https://raw.githubusercontent.com/HijelHub/GitStrap_SVG_Icons/b674246b8f46d8bc2c75f3cf5cf395a370b86ae2/icons/red/arrow-through-heart.svg"> in your document.
This system, although borderline insane, worked for many years.
What's Changed
There are two issues at play here
- Icon svg's now render with a non-transparent background
- Icon svg's no longer render inline with other text.
How It used to appear
How it appears now
You can see the background transparency change much more distinctly in Dark Mode.
The reason for this post
I am perfectly capable of accepting the fact that I... am most probably an idiot, and the solution to this issue is trivial but I just can't see it.
It may also be that this is an actual problem and many of us with mild neurological issues will be bothered by not being able to get the thing to do the thing the thing is supposed to be doing.
I am therefore summoning the horde to find answers...
- Have you experienced this issue?
- Do you know the cause, or how to fix it?
- Do you like the sound of stirring macaroni as much as I do?



Top comments (0)