Skip to content

Instantly share code, notes, and snippets.

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