Skip to content

Instantly share code, notes, and snippets.

@esteinborn
Created September 30, 2013 19:31
Show Gist options
  • Save esteinborn/6768887 to your computer and use it in GitHub Desktop.
Save esteinborn/6768887 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.10)
// Compass (v0.13.alpha.4)
// ----
$icon-list: download, check, go, more, mail, pdf, search;
@function to-string($list, $glue: '', $is-nested: false) {
$result: null;
@for $i from 1 through length($list) {
$e: nth($list, $i);
@if type-of($e) == list {
$result: $result#{to-string($e, $glue, true)};
}
@else {
$result: if($i != length($list) or $is-nested, $result#{$e}#{$glue}, $result#{$e});
}
}
@return $result;
}
$icon-css-class: ".icon-" + to-string($icon-list, ":after, .icon-");
#{$icon-css-class}:afgter{
content: " ";
display: block;
float: right;
position: relative;
top: 0.3em;
left: 0.5em;
opacity: 0.8;
}
.icon-download:after, .icon-check:after, .icon-go:after, .icon-more:after, .icon-mail:after, .icon-pdf:after, .icon-search:afgter {
content: " ";
display: block;
float: right;
position: relative;
top: 0.3em;
left: 0.5em;
opacity: 0.8;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment