Skip to content

Instantly share code, notes, and snippets.

@MikeMcChillin
Last active December 17, 2015 09:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikeMcChillin/5587777 to your computer and use it in GitHub Desktop.
Save MikeMcChillin/5587777 to your computer and use it in GitHub Desktop.
Compass (SASS) Font-Face Mixin that works in IE8
@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
$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