Created
July 10, 2016 11:15
-
-
Save bezenson/7957c5d8a1c8e55ccfe2d72d48ed5101 to your computer and use it in GitHub Desktop.
Resize Gulp Smiths Sprite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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