Skip to content

Instantly share code, notes, and snippets.

@codyogden
Created February 17, 2017 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codyogden/c675b4a41535d143f2c00df8c72e9023 to your computer and use it in GitHub Desktop.
Save codyogden/c675b4a41535d143f2c00df8c72e9023 to your computer and use it in GitHub Desktop.
Font Awesome Sass Helper and Mixin
// Font Awesome Helper (font-awesome/scss/_core.scss)
%fa {
display: inline-block;
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
// Font Awesome Mixin
@mixin fa($icon) {
@extend %fa;
content: $icon;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment