Last active
April 20, 2016 16:18
-
-
Save morganfeeney/1454c2ae8fb90fe9e5515b2fff19acae to your computer and use it in GitHub Desktop.
This file contains 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
@theme-name: "common"; | |
@base-url: "url/@{theme-name}"; | |
@font-face-file-path: "@{base-url}/fonts"; | |
.font-face( | |
@font-face-family; | |
@font-face-file-name; | |
@font-face-file-path: @font-face-file-path; | |
@font-face-directory: @font-face-family; | |
@font-face-weight: normal; | |
@font-face-style: normal | |
) { | |
@font-face { | |
font-family: '@{font-face-family}'; | |
src: url('@{font-face-file-path}/@{font-face-directory}/@{font-face-file-name}.eot'); | |
src: | |
url('@{font-face-file-path}/@{font-face-directory}/@{font-face-file-name}.eot#eifix') format('embedded-opentype'), | |
url('@{font-face-file-path}/@{font-face-directory}/@{font-face-file-name}.woff') format('woff'), | |
url('@{font-face-file-path}/@{font-face-directory}/@{font-face-file-name}.ttf') format('truetype'), | |
url('@{font-face-file-path}/@{font-face-directory}/@{font-face-file-name}.svg#@{font-face-family}') format('svg'); | |
font-weight: @font-face-weight; | |
font-style: @font-face-style; | |
} | |
/// Chrome for Windows rendering fix: http://www.adtrak.co.uk/blog/font-face-chrome-rendering/ | |
@media screen and (-webkit-min-device-pixel-ratio: 0) { | |
@font-face { | |
font-family: '@{font-face-file-path}/@{font-face-directory}/@{font-face-file-name}'; | |
src: url('@{font-face-file-path}/@{font-face-directory}/@{font-face-file-name}#@{font-face-family}') format('svg'); | |
} | |
} | |
} | |
.font-face(Manus;manus-webfont); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment