Skip to content

Instantly share code, notes, and snippets.

@cimmanon
Created October 29, 2014 19:33
Show Gist options
  • Save cimmanon/d7239fdaba9bcebad2be to your computer and use it in GitHub Desktop.
Save cimmanon/d7239fdaba9bcebad2be to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<label>foo</label>
<label class="blue">foo</label>
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
$sprite-names: 'foo.png', 'bar.png', 'baz.png';
@mixin retina-sprite($name, $sprite-name: 0, $hover: false, $active: false) {
$retina-sprite-names: $sprite-names !global;
$index: index($retina-sprite-names, $sprite-name);
debug: $index;
// $sprite : nth($retina-sprite-sprites, $index);
// $sprite-url : nth($retina-sprite-urls, $index);
// $sprite2x : nth($retina-sprite-sprites2x, $index);
// $sprite-url2x : nth($retina-sprite-urls2x, $index);
// @include _retina-sprite($name, $sprite, $sprite-url, $sprite2x, $sprite-url2x, $hover, $active);
}
.foo {
@include retina-sprite('foo', 'foo.png');
}
.bar {
@include retina-sprite('bar', 'bar.png');
}
.baz {
@include retina-sprite('baz', 'baz.png');
}
.foo {
debug: 1;
}
.bar {
debug: 2;
}
.baz {
debug: 3;
}
<label>foo</label>
<label class="blue">foo</label>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment