Skip to content

Instantly share code, notes, and snippets.

@bezenson
Created July 10, 2016 11:15
Show Gist options
  • Save bezenson/7957c5d8a1c8e55ccfe2d72d48ed5101 to your computer and use it in GitHub Desktop.
Save bezenson/7957c5d8a1c8e55ccfe2d72d48ed5101 to your computer and use it in GitHub Desktop.
Resize Gulp Smiths Sprite
@mixin sprite-resized($sprite-image, $ratio) {
background-position: (nth($sprite-image, 3) * $ratio) (nth($sprite-image, 4) * $ratio);
background-size: (nth($sprite-image, 7) * $ratio) (nth($sprite-image, 8) * $ratio);
width: nth($sprite-image, 5) * $ratio;
height: nth($sprite-image, 6) * $ratio;
}
// Notice: background-image not specified here. Extend from common sprite class or add manually.
.logo {
@include sprite-resized($icon-logo, 0.5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment