Created
January 30, 2017 17:35
-
-
Save strsar/a23c45b905995bc8a00ff9ce1bdafd97 to your computer and use it in GitHub Desktop.
[SCSS] - @font-face mixin
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
| /** | |
| * Build @font-face | |
| * | |
| * @vars {@family}, {@path}, {@weight}, {@style} | |
| */ | |
| @mixin typeface($family, $path, $weight: normal, $style: normal) { | |
| @font-face { | |
| font-family:$family; | |
| src: url('#{$path}.woff2') format('woff2'), | |
| url('#{$path}.woff') format('woff'), | |
| url('#{$path}.ttf') format('truetype'); | |
| font-weight:$weight; | |
| font-style:$style; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment