Skip to content

Instantly share code, notes, and snippets.

Created September 5, 2014 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/af2b5b8b37167128f317 to your computer and use it in GitHub Desktop.
Save anonymous/af2b5b8b37167128f317 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.1)
// Compass (v1.0.1)
// ----
// @Font-face
// =========
// Refactoring with variables
$font-name: 'BullenReg';
$base-font-dir: 'fonts/';
$font-folder: 'bullen/';
$font-path: $base-font-dir + $font-folder;
@mixin font-face($font-name, $font-folder, $fw, $fs, $base-font-dir: 'fonts/') {
// wrap in #{} for string interpolation
@font-face {
font-family: #{$font-name};
src:url('#{$font-path}#{$font-name}.eot');
src:url('#{$font-path}#{$font-name}.eot?#iefix') format('embedded-opentype'),
url('#{$font-path}#{$font-name}.woff') format('woff'),
url('#{$font-path}#{$font-name}.ttf') format('truetype'),
url('#{$font-path}#{$font-name}.svg?##{$font-name}') format('svg');
font-weight: #{$fw};
font-style: #{$fs};
}
}
@include font-face("BullenReg", $font-folder, 'normal', 'normal');
@include font-face("BullenBold", $font-folder, 'bold', 'normal');
@include font-face("BullenBoldItalic", $font-folder, 'bold', 'italic');
// @font-face {
// font-family: 'BullenBold';
// src:url('fonts/bullen/BullenBold.eot');
// src:url('fonts/BullenBold.eot?#iefix') format('embedded-opentype'),
// url('fonts/BullenBold.woff') format('woff'),
// url('fonts/BullenBold.ttf') format('truetype'),
// url('fonts/BullenBold.svg?#BullenBold') format('svg');
// font-weight: bold;
// font-style: normal;
// }
// @font-face {
// font-family: 'BullenBoldItalic';
// src:url('fonts/bullen/BullenBoldItalic.eot');
// src:url('fonts/BullenBoldItalic.eot?#iefix') format('embedded-opentype'),
// url('fonts/BullenBoldItalic.woff') format('woff'),
// url('fonts/BullenBoldItalic.ttf') format('truetype'),
// url('fonts/BullenBoldItalic.svg?#BullenBoldItalic') format('svg');
// font-weight: bold;
// font-style: italic;
// }
@font-face {
font-family: BullenReg;
src: url("fonts/bullen/BullenReg.eot");
src: url("fonts/bullen/BullenReg.eot?#iefix") format("embedded-opentype"), url("fonts/bullen/BullenReg.woff") format("woff"), url("fonts/bullen/BullenReg.ttf") format("truetype"), url("fonts/bullen/BullenReg.svg?#BullenReg") format("svg");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: BullenBold;
src: url("fonts/bullen/BullenBold.eot");
src: url("fonts/bullen/BullenBold.eot?#iefix") format("embedded-opentype"), url("fonts/bullen/BullenBold.woff") format("woff"), url("fonts/bullen/BullenBold.ttf") format("truetype"), url("fonts/bullen/BullenBold.svg?#BullenBold") format("svg");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: BullenBoldItalic;
src: url("fonts/bullen/BullenBoldItalic.eot");
src: url("fonts/bullen/BullenBoldItalic.eot?#iefix") format("embedded-opentype"), url("fonts/bullen/BullenBoldItalic.woff") format("woff"), url("fonts/bullen/BullenBoldItalic.ttf") format("truetype"), url("fonts/bullen/BullenBoldItalic.svg?#BullenBoldItalic") format("svg");
font-weight: bold;
font-style: italic;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment