Skip to content

Instantly share code, notes, and snippets.

@dirkschmid
dirkschmid / compass-retina-sprites.sass
Created March 21, 2012 12:30 — forked from thulstrup/compass-retina-sprites.scss
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png")
$sprites-retina: sprite-map("sprites-retina/*.png")
=sprite-background($name)
background-image: sprite-url($sprites)
background-position: sprite-position($sprites, $name)
background-repeat: no-repeat
display: block
height: image-height(sprite-file($sprites, $name))
width: image-width(sprite-file($sprites, $name))