Open yoonsy opened 10 years ago
Hmmm, is this using the master branch or 2.0 branch? Just curious because i'm about to merge 2.0 into master in the next few days. To be honest i'm not sure what's going on causing it to load 3 times. I've been using icon fonts lately so I haven't been using this for new projects.
I'm using master branch's _retina-sprites.scss
.
@AdamBrodzinski sprite-url()
call generates the sprite, every time you call it.
I have solved this issue by using global :( variable.
$sprite-url: sprite-url($icons);
@mixin _retina-sprite ...
background-image: $sprite-url;
Same for 2x sprite. Btw, why don't you use background: shortcut instead of applying each property individually?
I'm developing on Rails framework ver 3.2.13.
On development environment, sprite-url function generates sprite image several times. So, it takes long time to precompile scss file.
For example,
application.scss
file looks like below.I used
retina-sprite
mixin 3 times.It causes generating sprite image 3 times.