Last active
August 29, 2015 13:56
-
-
Save Demwunz/9048127 to your computer and use it in GitHub Desktop.
scss_each_loop.scss
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
/* | |
* a way to save time when you want to output a bunch of class names with corresponding filenames | |
*/ | |
$icons: sprite-map("icons/*.png"); | |
.select-custom--icons{ | |
background-image: sprite-url($icons); | |
background-color:white; | |
background-repeat: no-repeat; | |
} | |
$languages : (en, zh-cn, ja, it, pt, es, de); | |
@each $language in $languages { | |
$i: index($languages, $language); | |
.select-flag--#{$language}{ | |
background-position: sprite-position($icons, $language); | |
z-index: $i; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment