Skip to content

Instantly share code, notes, and snippets.

@Taova
Created October 26, 2015 12:30
Show Gist options
  • Save Taova/7cbd4df6bcbef5f8a69a to your computer and use it in GitHub Desktop.
Save Taova/7cbd4df6bcbef5f8a69a to your computer and use it in GitHub Desktop.
@mixin get-sprite ($map, $icon){
$sprite-image: sprite-file($map, $icon);
$sprite-map: sprite-url($map);
$sprite-position: sprite-position($map, $icon);
background: $sprite-map $sprite-position no-repeat;
$sprite-height: image-height($sprite-image);
$sprite-width: image-width($sprite-image);
height: $sprite-height;
width: $sprite-width;
}
//Вызов миксина
$socials: fb, vk ,tw;
$socials-map: sprite-map('icons/*.png', $spacing: 70px);
@each $social in $socials{
.header-social__link__#{$social} {
@include get-sprite($socials-map, $social);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment