Created
February 17, 2015 14:09
-
-
Save mavisland/45f0d1792e05f0051faa to your computer and use it in GitHub Desktop.
Web font loading mixin for 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
| // Load web-font | |
| .load-font(@family: Arial, @name: "font", @path: "../fonts/", @weight: normal, @style: normal) { | |
| @font-face { | |
| font-family: '@{family}'; | |
| src: url('@{path}@{name}.eot'); | |
| src: url('@{path}@{name}.eot?#iefix') format('embedded-opentype'), | |
| url('@{path}@{name}.woff2') format('woff2'), | |
| url('@{path}@{name}.woff') format('woff'), | |
| url('@{path}@{name}.ttf') format('truetype'), | |
| url('@{path}@{name}.svg#@{family}') 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