svg-sprite / gulp-svg-sprite

SVG sprites & stacks galore — Gulp plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours
MIT License
648 stars 43 forks source link

Decapitated Bird #52

Closed mcraiganthony closed 8 years ago

mcraiganthony commented 8 years ago

I have an SVG that is being mangled. The bird's head is effectively removed from its body and moved to new coordinates. In the CodePen example below you'll see the original SVG code followed by the output SVG code.

See: http://codepen.io/mcraiganthony/pen/KzEBaq

screen shot 2016-05-16 at 4 40 47 pm

I've had great success using gulp-svg-sprite with other, similar animations. It's saved me a TON of time. Here is an example: http://codepen.io/mcraiganthony/pen/XdPvmg

Any help would be appreciated. If you feel like this is the wrong forum for such a question, feel free to delete it. Thanks!

jkphl commented 8 years ago

@mcraiganthony Have you already tried playing with the SVGO plugins and selectively enabling / disabling them? This looks very much like an SVGO plugin being too aggressive ... You could use the online configurator ("SVG shape transformations") to quickly locate the malicious plugin ... Please let me know if that helps!

mcraiganthony commented 8 years ago

@jkphl I was leaning toward that same conclusion. Thanks for the link!

jkphl commented 8 years ago

@mcraiganthony Any success with this one yet?

mcraiganthony commented 8 years ago

@jkphl Still working on it. But skipping SVGO absolutely fixes it. Now I'm going to try various SVGO configs to see if I can pinpoint the problem.

Last week I tried https://jakearchibald.github.io/svgomg/ and disabled all options but still resulted in decapitated bird.

mcraiganthony commented 8 years ago

@jkphl AH! I had no idea SVGOMG features list was scrollable! The round/rewrite transforms feature was the culprit.

jkphl commented 8 years ago

@mcraiganthony Awesome! So you got it to work now also with (gulp-)svg-sprite?

mcraiganthony commented 8 years ago

Yes sir!