Skip to content

Instantly share code, notes, and snippets.

@carloscabo
Created June 6, 2013 11:25
Show Gist options
  • Save carloscabo/5720857 to your computer and use it in GitHub Desktop.
Save carloscabo/5720857 to your computer and use it in GitHub Desktop.
Dynamic font SASS mixin
@mixin font-face($font-family, $file-path, $weight: normal, $style: normal) {
@font-face {
font-family: $font-family;
font-weight: $weight;
font-style: $style;
src: font-url('#{$file-path}.eot');
src: font-url('#{$file-path}.eot?#iefix') format('embedded-opentype'),
font-url('#{$file-path}.woff') format('woff'),
font-url('#{$file-path}.ttf') format('truetype'),
font-url('#{$file-path}.svg##{$font-family}') format('svg');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment