Skip to content

Instantly share code, notes, and snippets.

@pablohart
Created September 12, 2012 12:33
Show Gist options
  • Save pablohart/3706320 to your computer and use it in GitHub Desktop.
Save pablohart/3706320 to your computer and use it in GitHub Desktop.
Compass Sprites
$sprites-nameofimage-position: 50%
h2
+sprites-sprite(nameofimage, $offset-x: 50%, $offset-y: 0px)
h2
background: url(nameofimage.png) no-repeat right 0
h2
+sprites-sprite(nameofimage, $offset-x: 100%, $offset-y: 0)
$sprites-nameofimage-position: 100%
$sprites-horiz-layout: horizontal
h2
background: url(nameofimage.png) no-repeat 3px 9px
h2
+sprites-sprite(nameofimage, $offset-x: 3px, $offset-y: 9px)
background: url("/assets/sprites-sa34a6d7aa5-e851c4ce7c78d99f04f7855226a50cfc.png") no-repeat scroll 0 0 transparent
background-position: 0 -202px
$sprites-spacing: 14px
$sprites-nameofimage-spacing: 30px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment