Last active
August 29, 2015 14:00
-
-
Save irunatbullets/0f3ae758ebfe5ee7f407 to your computer and use it in GitHub Desktop.
Compass font-face mixin wrapper.
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
// Super Font Face Mixin | |
// ============================================================================ | |
// | |
// If you have a standard set of fonts (i.e. woff, ttf, svg, eot), instead of | |
// having to list every font file with the Compass font mixin, just use this | |
// wrapper. | |
// | |
// Usage examples: | |
// @include super-font-face('Museo Sans', 'MuseoSans_500-webfont'); | |
// @include super-font-face('Museo Sans', 'MuseoSans_700-webfont', bold); | |
@mixin super-font-face($name, $font-file-name, $weight: false, $style: false) { | |
@include font-face( | |
$name, | |
font-files( | |
'#{unquote($font-file-name)}.woff', | |
'#{unquote($font-file-name)}.ttf', | |
'#{unquote($font-file-name)}.svg' | |
), | |
'#{unquote($font-file-name)}.eot', | |
$weight, | |
$style | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment