christian-reichart / svg-chameleon

Easily modify stroke-widths and colors of your SVGs via CSS!
18 stars 4 forks source link

stroke-width="1" gets removed in sprite #23

Closed joachim-pryntad closed 3 years ago

joachim-pryntad commented 3 years ago

If I have a stroke-width of 1 in my svg file, the stroke-width is removed in the sprite. Even if I set a customVar in the configuration for this specific width. I think the expected behavior is, that stroke-width="1" gets injected with a variable, so it can be used like any other stroke-width.

TheJotob commented 3 years ago

I actually did some research on this already. It seems to be a problem in svgson. And I created a ticket there (https://github.com/elrumordelaluz/svgson/issues/40) if that is resolved the issue should also be fixed here.

christian-reichart commented 3 years ago

Interesting, thanks for pointing it out. Will have a look, maybe there is an alternative if it doesn't get resolved.

christian-reichart commented 3 years ago

@TheJotob jfyi, the problem is with SVGO, not svgson. It optimizes away default values, I'm trying to find the right setting so these are kept.

christian-reichart commented 3 years ago

@TheJotob should be resolved with ecd97f20a9d4964f685ab16cbf84f1460992dcd4 , released 0.5.2 wich includes this fix