Last active
December 11, 2017 07:41
-
-
Save alexlouden/00285918b19925b3f0f2cc950600f500 to your computer and use it in GitHub Desktop.
Icon font sass
This file contains 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
<i class="icon-star"></i> |
This file contains 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
// Icon font | |
+font-face(icon-font-name, '/fonts/icon-font-name') | |
%icon | |
font-family: 'icon-font-name' | |
speak: none | |
font-style: normal | |
font-weight: normal | |
font-variant: normal | |
text-transform: none | |
line-height: 1 | |
-webkit-font-smoothing: antialiased | |
-moz-osx-font-smoothing: grayscale | |
[class^="icon-"], [class*=" icon-"] | |
@extend %icon | |
@mixin icon($name, $code) | |
.icon-#{$name}:before | |
content: "#{$code}" | |
// List icons and their codes as follows: | |
+icon(star, \e601) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment