Last active
December 17, 2015 09:29
-
-
Save MikeMcChillin/5587777 to your computer and use it in GitHub Desktop.
Compass (SASS) Font-Face Mixin that works in IE8
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
@mixin font-face ( $name, $font-files, $eot: false, $weight: false, $style: false) | |
$iefont: unquote("#{$eot}?#iefix") | |
@font-face | |
font-family: quote($name) | |
@if $eot | |
src: font-url($eot) | |
$font-files: font-url($iefont) unquote("format('embedded-opentype')"), $font-files | |
src: $font-files | |
@if $weight | |
font-weight: $weight | |
@if $style | |
font-style: $style |
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
$font-name: "icomoon" | |
+font-face("#{$font-name}", font-files( "#{$font-name}.woff", "#{$font-name}.ttf", "#{$font-name}.svg"), "#{$font-name}.eot", 300, normal) | |
=Icomoon | |
font-family: 'icomoon', arial, sans-serif | |
font-weight: normal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment