Skip to content

Instantly share code, notes, and snippets.

View haribote's full-sized avatar

KIMURA Tetsuro haribote

View GitHub Profile
@haribote
haribote / _compass-retina-sprites.scss
Created November 14, 2012 13:59 — forked from estahn/_compass-retina-sprites.scss
Using Compass to generate retina sprite maps at once
@mixin all-retina-sprites($map, $dimensions: false){
$base-class: sprite-map-name($map);
.#{$base-class}-retina-sprite{
background: sprite-url($map) no-repeat;
@include background-size(ceil(image-width(sprite-path($map)) / 2) auto);
}
@each $sprite in sprite-names($map){
.#{$base-class}-#{$sprite}{