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
647 stars 43 forks source link

Different positioning for identical images? #59

Closed jameschetwood closed 7 years ago

jameschetwood commented 8 years ago

I have 2 SVGs which are identical apart from the fill being a different colour. Im using one as the default style for a link and the other as a hover style. I noticed that one of the icons is about 1px off, creating a jarring affect when you hover over it.

As part of my debugging I tried duplicating the image and changing nothing about it apart from the file name. Ive used a diff program to confirm they are identical. However they are still not positioned in the same place, creating the jarring affect again.

Is this a known bug? Ive updated from 1.2.19 to 1.3.1 but its still occurring.

jameschetwood commented 8 years ago

Setting the padding to 1px fixes this as a workaround.

jkphl commented 8 years ago

@jameschetwood To me this very much sounds like https://github.com/jkphl/svg-sprite/issues/147 and / or https://github.com/jkphl/svg-sprite/issues/142. What do you think?

jkphl commented 7 years ago

In case this is still an issue for you: I will address this in the upcoming generation of svg-sprite.