This file contains 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
// Only requirement: save all your .png files in 2x format. As this uses background-size, only IE9+ supported, but will look nice for both retina and non retina devices. | |
// Just because I like to use <span>s | |
.icon-sprite { | |
display: inline-block; | |
} | |
// Compass automagically generate sprites | |
@import 'icon/*.png'; | |
// Override the mixin Compass core uses to generate the width/height/position and include background-size | |
@mixin sprite-background-position($map, $sprite, $offset-x, $offset-y, $fifth) { | |
$ypos: round(nth(sprite-position($map, $sprite), 2) / 2); |
This file contains 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
var server = sinon.fakeServer.create(); | |
var result1; | |
var result2; | |
server.respondWith("url/one", '{ "id": 1 }'); | |
server.respondWith("url/two", '{ "id": 2 }'); | |
$.getJSON('url/one', function(data) { | |
result1 = data; | |
}); |