Created
October 13, 2015 16:38
-
-
Save jeffskelton3/37225c2b955c79b0c8e6 to your computer and use it in GitHub Desktop.
a reusable less mixing for importing web fonts. Assumes all files in the same directory and name exactly the same except for their respective extensions.
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
.import-font(@fileName, @filePath, @fontFamily){ | |
@font-face { | |
font-family: @fontFamily; | |
src: url('@{filePath}@{fileName}.eot'); | |
src: url('@{filePath}@{fileName}.eot?#iefix') format('embedded-opentype'), | |
url('@{filePath}@{fileName}.woff') format('woff'), | |
url('@{filePath}@{fileName}.ttf') format('truetype'), | |
url('@{filePath}@{fileName}.svg#@{fileName}') 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