Created
January 3, 2012 22:26
-
-
Save sgreenfield/1557278 to your computer and use it in GitHub Desktop.
Compass font-face mixin
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('eot')"), $font-files; | |
} | |
@if $weight { font-weight: $weight; } | |
@if $style { font-style: $style; } | |
src: $font-files; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this the correct use?
@include font-face("this name", font-files("this.woff", woff, "this.otf", opentype), "this.eot")