Created
April 15, 2015 02:48
-
-
Save geckotang/97f8f2e60073d08d9aa4 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// 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); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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