Skip to content

Instantly share code, notes, and snippets.

@mikestreety
Created April 3, 2014 11:30
Show Gist options
  • Save mikestreety/9952736 to your computer and use it in GitHub Desktop.
Save mikestreety/9952736 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="list">HELLO</div>
<div class="sidebar">
<div class="list">HELLO</div>
</div>
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
$sprite-coins: red;
$sprite-hugo: blue;
$sprites: (
coins $sprite-coins,
hugo $sprite-hugo
);
.icon {
@each $name, $file in $sprites {
.icon-#{$name} {
background: unquote($file);
}
}
}
.icon .icon-coins {
background: red;
}
.icon .icon-hugo {
background: blue;
}
<div class="list">HELLO</div>
<div class="sidebar">
<div class="list">HELLO</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment