Created
November 29, 2012 22:03
-
-
Save ay13/4172202 to your computer and use it in GitHub Desktop.
sass/compass mixin for returning background path, background position, width and height
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_url_height_width($sprite_name, $image_name) { | |
background: sprite($sprite_name, $image_name) no-repeat; | |
width: image-width(sprite-file($sprite_name, $image_name)); | |
height: image-height(sprite-file($sprite_name, $image_name)); | |
} |
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
$sprite_name: sprite-map('folder/*.png', $spacing: 20px); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment