Skip to content

Instantly share code, notes, and snippets.

@mikestreety
Created January 6, 2014 10:09
Show Gist options
  • Save mikestreety/8280694 to your computer and use it in GitHub Desktop.
Save mikestreety/8280694 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
@mixin font-face($font-name, $file, $svg-font-name: false, $weight: 100, $style: normal) {
@font-face {
$fonts: url('#{$file}.eot?#iefix') format('embedded-opentype'), url('#{$file}.woff') format('woff'), url('#{$file}.ttf') format('truetype');
@if($svg-font-name) {
$fonts: $fonts, url('#{$file}.svg##{$svg-font-name}') format('svg');
}
font-family: quote($font-name);
src: url('#{$file}.eot');
src: $fonts;
font-weight: $weight;
font-style: $style;
}
}
@include font-face(mike, fonts/mike, testing);
@font-face {
font-family: "mike";
src: url("fonts/mike.eot");
src: url("fonts/mike.eot?#iefix") format("embedded-opentype"), url("fonts/mike.woff") format("woff"), url("fonts/mike.ttf") format("truetype"), url("fonts/mike.svg#testing") format("svg");
font-weight: 100;
font-style: normal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment