Created
October 26, 2015 12:30
-
-
Save Taova/7cbd4df6bcbef5f8a69a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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