Created
May 20, 2013 14:58
-
-
Save thamas/5612764 to your computer and use it in GitHub Desktop.
Compass @font-face mixin
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
// | |
// Default font dir is <css_dir>/fonts Set fonts_dir in config.rb | |
// if you want to change. See: | |
// http://compass-style.org/help/tutorials/configuration-reference/ | |
// | |
// http://compass-style.org/reference/compass/css3/font_face/ | |
// "Order of the includes matters, and it is: normal, bold, italic, bold+italic." | |
// | |
// See also: http://mikefowler.me/thoughts/compass-font-face-syntax/; | |
// | |
@include font-face('My Font Name', | |
font-files( | |
'myfont.woff', woff, | |
'myfont.ttf', ttf, | |
'myfont.svg', svg | |
), | |
'myfont.eot', | |
normal, | |
normal | |
); | |
// Repeat for bold, italic, bolditalic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment