Created
March 2, 2015 19:05
-
-
Save raulghm/5ef3af87d7b364b8ec52 to your computer and use it in GitHub Desktop.
SASS loop
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
// icons | |
// type item loop | |
$list: | |
test list, | |
article file-text-o, | |
video film, | |
pdf file-pdf-o, | |
link link, | |
audio volume-up; | |
@each $var in $list { | |
$type: nth($var, 1); | |
$icon: nth($var, 2); | |
$selector: '&--#{$type}'; | |
#{$selector} { | |
.#{$component} { | |
&-item { | |
&-top { | |
&-type { | |
i { | |
@include icon(#{$icon}); | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment