-
-
Save julientaq/7417061 to your computer and use it in GitHub Desktop.
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
// ______________________________________________________________________ // | |
// font-face mixin override // | |
// ______________________________________________________________________ // | |
@mixin font-face( | |
$name, | |
$font-files, | |
$eot: false, | |
$weight: false, | |
$style: false, | |
$unicode-range: false, | |
$local: 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; | |
} | |
@if $local { | |
src: local(quote($local)), $font-files; | |
} @else { | |
src: $font-files; | |
} | |
@if $unicode-range { | |
unicode-range: $unicode-range; | |
} | |
@if $weight { | |
font-weight: $weight; | |
} | |
@if $style { | |
font-style: $style; | |
} | |
} | |
} |
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
@include font-face( | |
"myfont", | |
font-files( | |
"myfont.woff", woff, | |
"myfont.ttf", opentype, | |
"myfont.svg#webfontJRppkSIE", svg | |
), | |
"myfont.eot", | |
normal, | |
normal, | |
(U+1700-1714, U+1735-1736), | |
☺ | |
); |
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
@font-face { | |
font-family: "myfont"; | |
src: url('myfont.eot'); | |
src: local("☺"), url('myfont.eot?#iefix') format('embedded-opentype'), url('myfont.woff') format('woff'), url('myfont.ttf') format('opentype'), url('myfont.svg#webfontJRppkSIE') format('svg'); | |
unicode-range: U+1700-1714, U+1735-1736; | |
font-weight: normal; | |
font-style: normal; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment