Skip to content

Instantly share code, notes, and snippets.

@webfacer
Created April 10, 2014 19:46
Show Gist options
  • Save webfacer/10416282 to your computer and use it in GitHub Desktop.
Save webfacer/10416282 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@mixin font-type( $name, $src, $style, $weight: 400 ) {
@font-face {
font-family: $name;
font-style: $style;
font-weight: $weight;
src: url( $src );
}
}
@mixin test( $params: () ) {
@each $key in $params {
@each $animal, $color, $cursor in $key {
.#{$animal}-icon {
background-image: url('/images/#{$animal}.png');
border: 2px solid $color;
cursor: $cursor;
}
}
}
}
$test:
('puma', 'red', 'default'),
('sea-slug', 'blue', 'pointer'),
('egret', 'white', 'move');
@include test($test);
.puma-icon {
background-image: url("/images/puma.png");
border: 2px solid;
}
.red-icon {
background-image: url("/images/red.png");
border: 2px solid;
}
.default-icon {
background-image: url("/images/default.png");
border: 2px solid;
}
.sea-slug-icon {
background-image: url("/images/sea-slug.png");
border: 2px solid;
}
.blue-icon {
background-image: url("/images/blue.png");
border: 2px solid;
}
.pointer-icon {
background-image: url("/images/pointer.png");
border: 2px solid;
}
.egret-icon {
background-image: url("/images/egret.png");
border: 2px solid;
}
.white-icon {
background-image: url("/images/white.png");
border: 2px solid;
}
.move-icon {
background-image: url("/images/move.png");
border: 2px solid;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment