Skip to content

Instantly share code, notes, and snippets.

@geckotang
Created April 15, 2015 02:48
Show Gist options
  • Save geckotang/97f8f2e60073d08d9aa4 to your computer and use it in GitHub Desktop.
Save geckotang/97f8f2e60073d08d9aa4 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.19)
// Compass (v0.12.7)
// ----
@function getValue ( $assoc, $key ) {
@each $pair in $assoc {
@if nth( $pair, 1 ) == $key {
@return nth( $pair, 2 );
}
}
@return null;
}
$icons: (
pxg "\E600",
html5 "\E601",
css3 "\E602",
js "\E603",
webgl "\E604",
hamburger "\E700",
left "\E701",
right "\E702"
);
@mixin icon ( $name ) {
content: getValue( $icons, $name );
font-family: 'myicon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
vertical-align: middle;
display: inline-block;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.hoge {
@include icon(right);
}
.hoge {
content: "\E702";
font-family: 'myicon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
vertical-align: middle;
display: inline-block;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment