New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sprite with smart layout not support sprite-spacing? #718

Open
doabit opened this Issue Feb 14, 2012 · 21 comments

Comments

Projects
None yet
@doabit

doabit commented Feb 14, 2012

When i use sprite-layout with smart, sprite-spacing not work, does it not support sprite-spacing with smart layout?

$icon-spacing: 5px !default;
$icon-layout:"smart";

@doabit

This comment has been minimized.

Show comment
Hide comment
@doabit

doabit Feb 14, 2012

I found http://beta.compass-style.org/help/tutorials/spriting/sprite-layouts/ and it shows not support configuration options

doabit commented Feb 14, 2012

I found http://beta.compass-style.org/help/tutorials/spriting/sprite-layouts/ and it shows not support configuration options

@doabit doabit closed this Feb 14, 2012

@scottdavis

This comment has been minimized.

Show comment
Hide comment
@scottdavis

scottdavis Feb 14, 2012

Member

Correct this is a limitation of smart layout

Sent from my iPhone

On Feb 14, 2012, at 9:34 AM, doabitreply@reply.github.com wrote:

When i use sprite-layout with smart, sprite-spacing not work, does it not support sprite-spacing with smart layout?

$icon-spacing: 5px !default;
$icon-layout:"smart";


Reply to this email directly or view it on GitHub:
#718

Member

scottdavis commented Feb 14, 2012

Correct this is a limitation of smart layout

Sent from my iPhone

On Feb 14, 2012, at 9:34 AM, doabitreply@reply.github.com wrote:

When i use sprite-layout with smart, sprite-spacing not work, does it not support sprite-spacing with smart layout?

$icon-spacing: 5px !default;
$icon-layout:"smart";


Reply to this email directly or view it on GitHub:
#718

@afewyards

This comment has been minimized.

Show comment
Hide comment
@afewyards

afewyards Mar 26, 2013

why is this a limitation.. I find myself over and over again trying to get around some bugs because this isn't here.

afewyards commented Mar 26, 2013

why is this a limitation.. I find myself over and over again trying to get around some bugs because this isn't here.

@scottdavis

This comment has been minimized.

Show comment
Hide comment
@scottdavis

scottdavis Mar 26, 2013

Member

because of the packing algorithm. If you want to use spacing use horizontal or vertical.

Member

scottdavis commented Mar 26, 2013

because of the packing algorithm. If you want to use spacing use horizontal or vertical.

@afewyards

This comment has been minimized.

Show comment
Hide comment
@afewyards

afewyards Mar 26, 2013

figured that it had something to do with the algorithm.. thing is that when you use the other ones it uses a larger PNG file if you want to fit in all those assets into it.. and when it exceeds 1024px the iPad < retina will not cache those files.. so you need to split up way quicker..

afewyards commented Mar 26, 2013

figured that it had something to do with the algorithm.. thing is that when you use the other ones it uses a larger PNG file if you want to fit in all those assets into it.. and when it exceeds 1024px the iPad < retina will not cache those files.. so you need to split up way quicker..

@afewyards

This comment has been minimized.

Show comment
Hide comment
@afewyards

afewyards Mar 26, 2013

can you otherwise point me in the direction where the algoritm is stored and used so I can take a look. thanks.

afewyards commented Mar 26, 2013

can you otherwise point me in the direction where the algoritm is stored and used so I can take a look. thanks.

@afewyards

This comment has been minimized.

Show comment
Hide comment
@afewyards

afewyards Mar 26, 2013

thanks you!

afewyards commented Mar 26, 2013

thanks you!

@estahn

This comment has been minimized.

Show comment
Hide comment
@estahn

estahn Apr 4, 2013

Any progress here? The issue we have is with zoom level in different browsers. It will show a part of the other image if there is no spacing.

estahn commented Apr 4, 2013

Any progress here? The issue we have is with zoom level in different browsers. It will show a part of the other image if there is no spacing.

@evangelion1204

This comment has been minimized.

Show comment
Hide comment
@evangelion1204

evangelion1204 May 15, 2013

We too have the same problem with zooming and mobile devices that interpolate sprites on Android devices.
Android devices doesn't support images bigger than 4096px and start scaling them down to bad quality. Because of that it is not possible to use a big sprite in responsive designs.

evangelion1204 commented May 15, 2013

We too have the same problem with zooming and mobile devices that interpolate sprites on Android devices.
Android devices doesn't support images bigger than 4096px and start scaling them down to bad quality. Because of that it is not possible to use a big sprite in responsive designs.

@Raibaz

This comment has been minimized.

Show comment
Hide comment
@Raibaz

Raibaz May 23, 2013

Same problem here, been looking into the smart layout to use the sprite on an iPad < retina, but i need to have the images spaced inside the sprite...any progress on this?

Raibaz commented May 23, 2013

Same problem here, been looking into the smart layout to use the sprite on an iPad < retina, but i need to have the images spaced inside the sprite...any progress on this?

@chriseppstein

This comment has been minimized.

Show comment
Hide comment
@chriseppstein

chriseppstein May 23, 2013

Member

We should implement this feature.

Member

chriseppstein commented May 23, 2013

We should implement this feature.

@chriseppstein chriseppstein reopened this May 23, 2013

@afewyards

This comment has been minimized.

Show comment
Hide comment
@afewyards

afewyards May 23, 2013

worked on it for a bit.. but no result yet unfortunately..

afewyards commented May 23, 2013

worked on it for a bit.. but no result yet unfortunately..

@evangelion1204

This comment has been minimized.

Show comment
Hide comment
@evangelion1204

evangelion1204 May 23, 2013

Well I got a working solution for me but I never wasted a thought that the spacing changes from sprite to sprite, thats something I didn't need until now.
But I don't really have an idea how to contribute to the project, need to read the FAQ for that first

evangelion1204 commented May 23, 2013

Well I got a working solution for me but I never wasted a thought that the spacing changes from sprite to sprite, thats something I didn't need until now.
But I don't really have an idea how to contribute to the project, need to read the FAQ for that first

@ArekBartnik

This comment has been minimized.

Show comment
Hide comment
@ArekBartnik

ArekBartnik May 24, 2013

Could someone explain why this is a limitation of smart layout but not horizontal or vertical?

ArekBartnik commented May 24, 2013

Could someone explain why this is a limitation of smart layout but not horizontal or vertical?

@afewyards

This comment has been minimized.

Show comment
Hide comment
@afewyards

afewyards May 24, 2013

^^ scottdavis wrote: "because of the packing algorithm. If you want to use spacing use horizontal or vertical."

afewyards commented May 24, 2013

^^ scottdavis wrote: "because of the packing algorithm. If you want to use spacing use horizontal or vertical."

@materliu

This comment has been minimized.

Show comment
Hide comment
@materliu

materliu Jul 17, 2013

yeah, we truly nead the spacing fun when we use smart sprite

materliu commented Jul 17, 2013

yeah, we truly nead the spacing fun when we use smart sprite

@piouPiouM

This comment has been minimized.

Show comment
Hide comment
@piouPiouM

piouPiouM Jul 17, 2013

Contributor

One suggestion: you should only use smart layout with elements having the dimensions of the images to display (and a display: block for example). This will prevent any overflow. If this is not possible with some elements, then store them in a vertical sprite.

In addition, instead of loading a huge sprite will have a significant weight maybe split it in multiple sprites? Of course, this requires additional HTTP requests, but you already save many using sprites.

Contributor

piouPiouM commented Jul 17, 2013

One suggestion: you should only use smart layout with elements having the dimensions of the images to display (and a display: block for example). This will prevent any overflow. If this is not possible with some elements, then store them in a vertical sprite.

In addition, instead of loading a huge sprite will have a significant weight maybe split it in multiple sprites? Of course, this requires additional HTTP requests, but you already save many using sprites.

camilonova added a commit to camilonova/compass that referenced this issue Oct 29, 2013

camilonova added a commit to camilonova/compass that referenced this issue Oct 29, 2013

@therazor

This comment has been minimized.

Show comment
Hide comment
@therazor

therazor Feb 16, 2015

There seems to be a patch, but the feature is not working as of v 1.0.3.
Is it still unmerged?

therazor commented Feb 16, 2015

There seems to be a patch, but the feature is not working as of v 1.0.3.
Is it still unmerged?

@jo32

This comment has been minimized.

Show comment
Hide comment
@jo32

jo32 Jul 20, 2015

http://stackoverflow.com/questions/16793278/generate-sprites-with-compass-with-smart-layout-and-spacing

Somebody has already patch it for us. Maybe it is time to add this feature?

jo32 commented Jul 20, 2015

http://stackoverflow.com/questions/16793278/generate-sprites-with-compass-with-smart-layout-and-spacing

Somebody has already patch it for us. Maybe it is time to add this feature?

@borys-p

This comment has been minimized.

Show comment
Hide comment
@borys-p

borys-p Feb 4, 2016

How about a global spacing for all sprites in one map? This should be much easier to implement. It's been almost four years since the first report and this issue is still open...

borys-p commented Feb 4, 2016

How about a global spacing for all sprites in one map? This should be much easier to implement. It's been almost four years since the first report and this issue is still open...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment