Last active
September 29, 2015 21:48
-
-
Save marvinahv/1673812 to your computer and use it in GitHub Desktop.
A little mixin to add fonts from Font Squirrel
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
// Mixin to use fonts generated by Font Squirrel (http://www.fontsquirrel.com) | |
@mixin font_squirrel_font($font-name, $file-name){ | |
$font-url: "/font/#{$file-name}"; | |
@font-face { | |
font-family: $font-name; | |
src: "#{$font-url}.eot"; | |
src: local("#{$font-name}"), url("#{$font-url}.eot?#iefix") format("embedded-opentype"), | |
url("#{$font-url}.woff") format("woff"), | |
url("#{$font-url}.ttf") format("truetype"), | |
url("#{$font-url}.svg##{$font-name}") format("svg"); | |
font-weight: normal; | |
font-style: normal; | |
} | |
} | |
// FONTS | |
@include font_squirrel_font('Name of Font', 'name-of-font-file'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment