Skip to content

Instantly share code, notes, and snippets.

@bcinarli
Created October 19, 2013 12:50
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bcinarli/7055354 to your computer and use it in GitHub Desktop.
Save bcinarli/7055354 to your computer and use it in GitHub Desktop.
Font-face mixin for SASS
@mixin fontface($name, $file, $weight: normal, $style: normal){
@font-face {
font-family: "#{$name}";
src: url('../fonts/#{$file}.eot');
src: url('../fonts/#{$file}.eot?#iefix') format('embedded-opentype'),
url('../fonts/#{$file}.woff') format('woff'),
url('../fonts/#{$file}.ttf') format('truetype'),
url('../fonts/#{$file}.svg?#webfont') format('svg');
font-weight: $weight;
font-style: $style;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment