Skip to content

Instantly share code, notes, and snippets.

Easy responsive sprites with background-size using grunt-spritesmith and SCSS

Requires grunt-spritesmith which generates a spritesheet from a bunch of images.

This gist passes a custom template for spritesmith to generate the SCSS file.

Gruntfile.js

sprite: {
 src: "images/*.png",