Skip to content

Instantly share code, notes, and snippets.

@megakote
Last active January 3, 2016 22:39
Show Gist options
  • Save megakote/3000b4e2677ae102b380 to your computer and use it in GitHub Desktop.
Save megakote/3000b4e2677ae102b380 to your computer and use it in GitHub Desktop.
@import "compass/css3";
@import "compass/utilities";
$icons-sprites: sprite-map("icons/*.png");
@mixin sprite_images($sprite, $icon) {
background: sprite($sprite, $icon) no-repeat;
width: image-width(sprite-file($sprite, $icon));
height: image-height(sprite-file($sprite, $icon));
}
@import "_fn.scss";
.error {
@include sprite_images($icons-sprites, 'error');
}
.info {
@include sprite_images($icons-sprites, 'info');
}
.logo {
@include sprite_images($icons-sprites, 'logo');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment