Created
          December 15, 2014 07:34 
        
      - 
      
- 
        Save mz026/58c30ff2699a76b35a0d to your computer and use it in GitHub Desktop. 
Revisions
- 
        mz026 created this gist Dec 15, 2014 .There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ $buttons2x-sprites: sprite-map('buttons2x/*.png'); %buttons2x-sprite { background-image: sprite-url($buttons2x-sprites); } @mixin buttons2x-sprite($sprite-name){ @extend %buttons2x-sprite; background-repeat: no-repeat; $xpos: (nth(sprite-position($buttons2x-sprites, $sprite-name), 1) / 2); $ypos: (nth(sprite-position($buttons2x-sprites, $sprite-name), 2) / 2); background-position: $xpos $ypos; height: image-height(sprite-file($buttons2x-sprites, $sprite-name)) / 2; width: image-width(sprite-file($buttons2x-sprites, $sprite-name)) / 2; @include background-size(image-width(sprite-path($buttons2x-sprites))/2 image-height(sprite-path($buttons2x-sprites))/2); }