Open doabit opened 12 years ago
I found http://beta.compass-style.org/help/tutorials/spriting/sprite-layouts/ and it shows not support configuration options
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: https://github.com/chriseppstein/compass/issues/718
why is this a limitation.. I find myself over and over again trying to get around some bugs because this isn't here.
because of the packing algorithm. If you want to use spacing use horizontal or vertical.
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..
can you otherwise point me in the direction where the algoritm is stored and used so I can take a look. thanks.
thanks you!
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.
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.
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?
We should implement this feature.
worked on it for a bit.. but no result yet unfortunately..
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
Could someone explain why this is a limitation of smart layout but not horizontal or vertical?
^^ scottdavis wrote: "because of the packing algorithm. If you want to use spacing use horizontal or vertical."
yeah, we truly nead the spacing fun when we use smart sprite
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.
There seems to be a patch, but the feature is not working as of v 1.0.3. Is it still unmerged?
Somebody has already patch it for us. Maybe it is time to add this feature?
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...
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";