Skip to content

Instantly share code, notes, and snippets.

@thamas
Created May 20, 2013 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thamas/5612764 to your computer and use it in GitHub Desktop.
Save thamas/5612764 to your computer and use it in GitHub Desktop.
Compass @font-face mixin
//
// 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