Skip to content

Instantly share code, notes, and snippets.

@joldnl
Created October 16, 2013 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joldnl/7008299 to your computer and use it in GitHub Desktop.
Save joldnl/7008299 to your computer and use it in GitHub Desktop.
@font-face Mixin
@registerfont (@face, @file, @weight: normal, @style: normal) {
@filename: '../fonts/' + @file + '_' + @weight + '_' + @style;
(~'@font-face') {
font-family: @face;
src: url(@filename + '.eot');
src: url(@filename + '.eot?#iefix') format('embedded-opentype'),
url(@filename + '.woff') format('woff'),
url(@filename + '.ttf') format('truetype'),
url(@filename + '.svg#' + @file + @weight + @style) 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