Describe the bug
When a SVG with a stroke="currentColor" or fill="currentColor" is passed through SVGO's default settings, currentColor is replaced with currentcolor. This case transformation doesn't break the SVG entirely - you can open it in Illustrator or Inkscape and it displays fine. But it DOES completely break thumbnail previews in Window Explorer using typical SVG codecs. RESVG is one of them.
Here is a screenshot after processing the "Feather" Icon set:

To Reproduce
Steps to reproduce the behavior:
- Download the Feather Icon Set.
- Unzip the archive.
- Run
svgo -rf .\Feather\ in the same directory that the Feather folder exists within.
- Open the Feather directory and change your explorer view to thumbnails.
- You should see that all SVGs are now all rendering as completely black boxes.
Example outputted SVG code:
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>
What the code should look like:
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>
Expected behavior
- SVGO to not transform "currentColor" to all lowercase "currentcolor".
- After running SVGO, I expect SVGs to render correctly in Windows Explorer using a SVG codec shell extension.
Desktop (please complete the following information):
- SVGO Version: 4.0.0-rc.4
- Node.js Version [e.g 16.16.0]: v23.11.0
- OS: [e.g. iOS]: Windows 10 Pro x64
Additional context
The only fix that needs to be made here is to just not transform "currentColor" to "currentcolor". This has to be unbelievably easy to fix, and it will completely solve the problem.
In the meantime, is there a way that I can disable SVGO from touching the fill/stroke color values?
Describe the bug
When a SVG with a
stroke="currentColor"orfill="currentColor"is passed through SVGO's default settings,currentColoris replaced withcurrentcolor. This case transformation doesn't break the SVG entirely - you can open it in Illustrator or Inkscape and it displays fine. But it DOES completely break thumbnail previews in Window Explorer using typical SVG codecs. RESVG is one of them.Here is a screenshot after processing the "Feather" Icon set:
To Reproduce
Steps to reproduce the behavior:
svgo -rf .\Feather\in the same directory that the Feather folder exists within.Example outputted SVG code:
What the code should look like:
Expected behavior
Desktop (please complete the following information):
Additional context
The only fix that needs to be made here is to just not transform
"currentColor"to"currentcolor". This has to be unbelievably easy to fix, and it will completely solve the problem.In the meantime, is there a way that I can disable SVGO from touching the fill/stroke color values?