Skip to content

Instantly share code, notes, and snippets.

@anthonycole
Created August 15, 2013 05:23
Show Gist options
  • Save anthonycole/6238458 to your computer and use it in GitHub Desktop.
Save anthonycole/6238458 to your computer and use it in GitHub Desktop.
A quick mixin example for font-face and less.
/*
This should be put in your mixins.less file.
*/
.font-face(@fontname)
{
font-family: "@{fontname}";
src: url("/assets/fonts/@{fontfile}.eot");
src: url("/assets/fonts/@{fontpath}/@{fontfile}.eot?#iefix") format("embedded-opentype"),
url("/assets/fonts/@{fontfile}.woff") format("woff"),
url("/assets/fonts/@{fontfile}.ttf") format("truetype"),
url("/assets/fonts/@{fontfile}.svg#@{fontname}") format("svg");
font-weight: normal;
font-style: normal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment