Created
March 20, 2016 06:16
-
-
Save crecotun/07e587a2c09c7651fa2e to your computer and use it in GitHub Desktop.
Sprite mixin for sass
This file contains 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($sprite) | |
$selector: #{&} | |
$hover: str-index($selector, 'hover') | |
$active: str-index($selector, 'active') | |
@if not ($active or $hover) | |
+spriteImage($sprite) | |
+spritePosition($sprite) | |
+spriteWidth($sprite) | |
+spriteHeight($sprite) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment