Skip to content

Instantly share code, notes, and snippets.

@harrypujols
Last active August 29, 2015 13:57
Show Gist options
  • Save harrypujols/9623235 to your computer and use it in GitHub Desktop.
Save harrypujols/9623235 to your computer and use it in GitHub Desktop.
// calling the sprites -- needs compass to run
// make sure the first part of the call matches the name of the folder
// inside the img folder where the separate sprite images will be located
$foo-layout: smart; // this is called as <folder>-layout - same goes with the following lines
$foo-spacing: 10px; // this doesn't seen to work when the layout is set as smart, but doesn't hurt to have it here
$foo-sprite-dimensions: true; // this will automatically add the dimensions of every image in the sprite
@import "foo/*.png"; // calls all the pngs in the folder called 'image' inside the img folder
@include all-foo-sprites; // it will add all the images in the sprite as classes in the compiled css
[class*="foo-"] {
display: inline-block;
vertical-align: middle;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment