Skip to content

Instantly share code, notes, and snippets.

@vitto
Created July 15, 2014 13:11
Show Gist options
  • Save vitto/1bf5536a0b69a4ece97d to your computer and use it in GitHub Desktop.
Save vitto/1bf5536a0b69a4ece97d to your computer and use it in GitHub Desktop.
Frontsize - Exampe for scaleBackgroundSize mixin
<div class="bottom-margin">A 32px size icon sprite create with a 16px svg sprite</div>
<div class="sprite-32"></div>
.sprite-32 {
@scale : 2;
@spriteSize : 16px;
@backgroundWidth : 512px;
@backgroundHeight : 128px;
.sprite("sprites-16.svg", @spriteSize);
.size(@spriteSize, @spriteSize, @scale);
.scaleBackgroundSize(@scale, @backgroundWidth, @backgroundHeight);
}
@vitto
Copy link
Author

vitto commented Jul 18, 2014

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