twolfson/spritesmith

Add padding around boundary area

krimeshu opened this issue · 5 comments

When I cut icon images align it's boundary, and then found display problems on some android devices browser.
The sprite image looks like this: (dark area means padding of spritesmith)
01

So I have to keep another padding when I cut the images, to achieve the effect like that:
02

It's boring and not effective, could spritesmith help me add the boundary padding like that? It whill solve my big problem, thx~

Could you elaborate on the problem you are encountering?

For example, the icon images might look like this:
image
And then join them into the sprites images:
image
The problem arises:
image
The yellow icon is in the right bottom corner, but it might mix up with the icon right top and left bottom.

Ah, I see. Setting background-repeat: no-repeat in the CSS should resolve that. It's caused by scaling images and why we initially introduced padding as an option:

#7

Oh, I forgot adding it to my automatic tasks... Maybe this problem won't show on most android devices again, thank you!

I'm glad that resolved that issue =)