Skip to content

Instantly share code, notes, and snippets.

@raulghm
Created March 2, 2015 19:05
Show Gist options
  • Save raulghm/5ef3af87d7b364b8ec52 to your computer and use it in GitHub Desktop.
Save raulghm/5ef3af87d7b364b8ec52 to your computer and use it in GitHub Desktop.
SASS loop
// 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