Skip to content

Instantly share code, notes, and snippets.

View stikoo's full-sized avatar
🏠
Working from home

Alastair Hodgson stikoo

🏠
Working from home
View GitHub Profile
@antonkor
antonkor / get-sprite.sass
Created August 7, 2012 19:54 — forked from dfadler/get-sprite.sass
A SASS mixin for generating a sprite declaration block that will work with media queries. UPDATE: Having offset-x & -y are very nice ;)
// http://compass-style.org/reference/compass/helpers/sprites/
@mixin get-sprite($map, $sprite, $offset-x: 0, $offset-y: 0, $repeat: no-repeat, $height: true, $width: true)
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file
$sprite-image: sprite-file($map, $sprite)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url
$sprite-map: sprite-url($map)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position