Skip to content

Instantly share code, notes, and snippets.

@jruz
Created November 4, 2014 12:36
Show Gist options
  • Save jruz/929ad8238ca6443087f1 to your computer and use it in GitHub Desktop.
Save jruz/929ad8238ca6443087f1 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$icons-map: (
apple: "\x01",
android: "\x02");
@each $name, $code in $icons-map {
.icon-#{$name} {
content: $code;
}
}
@mixin get-icon($name){
@if map-has-key($icons-map, $name){
content: map-get($icons-map, $name);
font-family: 'Chameleon custom icons';
}
@else {
@error "The icon named '#{$name}' was not found!";
}
}
.not-found {
@include get-icon("asdf");
}
.found {
@include get-icon("apple");
}
The icon named 'asdf' was not found!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment