Created
September 23, 2014 13:22
-
-
Save widescreenBob/912c1b656fb2a12ee178 to your computer and use it in GitHub Desktop.
Font Face Example
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
//a variable to contain any extra path information required for the mixin | |
$base: path to font folder | |
//mixin (using shorthand) for fontface integration | |
=fontFace($family, $src, $weight: normal, $style: normal) | |
@font-face | |
font-family: $family | |
src: url("#{$base}/fonts/#{$src}.eot") | |
// IE9 compat | |
src: url("#{$base}/fonts/#{$src}.eot?#iefix") format("embedded-opentype"), url("#{$base}/fonts/#{$src}.woff") format("woff"), url("#{$base}/fonts/#{$src}.ttf") format("truetype"), url("#{$base}/fonts/#{$src}.svg") format("svg") | |
// legacy iOS | |
font-style: $style | |
font-weight: $weight | |
// Load Font Example, how you would use the above mixin | |
+fontFace(tobias-regular, tobias-regular-folder) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment