Last active
July 16, 2017 17:41
-
-
Save LoyEgor/29bc79c67bbe12434910052a22810cb4 to your computer and use it in GitHub Desktop.
mixin for easier custom font use
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
@fdir: '../fonts/'; | |
@ff-name: 'CirceRoundedAlt'; | |
@rg: '@{ff-name}-Regular1'; | |
@bd: '@{ff-name}-Regular2'; | |
.ff(@ff) { | |
font-family: e(replace(@ff, @ff-name, "cust-ff")), Arial, Helvetica Neue, Helvetica, sans-serif; | |
} | |
.ff-mix(@ff) { | |
@font-face { | |
font-family: e(replace(@ff, @ff-name, "cust-ff")); | |
src: url('@{fdir}@{ff}.eot'); | |
src: url('@{fdir}@{ff}.eot?#iefix') format('embedded-opentype'), | |
url('@{fdir}@{ff}.otf') format('opentype'),//remove if not exist | |
url('@{fdir}@{ff}.woff2') format('woff2'), | |
url('@{fdir}@{ff}.woff') format('woff'), | |
url('@{fdir}@{ff}.ttf') format('truetype'), | |
url('@{fdir}@{ff}.svg#@{ff}') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
} | |
.ff-mix(@rg); | |
.ff-mix(@bd); | |
// .class{ | |
// .ff(@bd); | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment