Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Font Face Example
//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