Skip to content

Instantly share code, notes, and snippets.

@yoanmarchal
Created May 30, 2015 14:56
Show Gist options
  • Save yoanmarchal/7ec7917ac8ed2adfdaf6 to your computer and use it in GitHub Desktop.
Save yoanmarchal/7ec7917ac8ed2adfdaf6 to your computer and use it in GitHub Desktop.
Mix in font face Less
@mixin font-face($font-family, $file-path, $font-weight, $font-style) {
@font-face {
font-family: $font-family;
src: url('#{$file-path}.eot');
src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'),
url('#{$file-path}.woff') format('woff'),
url('#{$file-path}.ttf') format('truetype'),
url('#{$file-path}.svg##{$font-family}') format('svg');
font-weight: $font-weight;
font-style: $font-style;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment