Created
August 15, 2013 05:23
-
-
Save anthonycole/6238458 to your computer and use it in GitHub Desktop.
A quick mixin example for font-face and less.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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