Created
May 15, 2019 20:22
-
-
Save artlili/a5a96a617b20fb74a9d8f20c1fd0c3fa to your computer and use it in GitHub Desktop.
Fonts function
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
$font: ("Bold": bold, "Regular": normal, "Medium": 500, "Thin": 100); | |
@each $style, $width in $font { | |
$url: $base-font-family + '-' + #{$style}; | |
$rel_url: '/fonts/' + $url + '/' + $url; | |
@font-face { | |
font-family: $base-font-family; | |
src: url($rel_url + '.eot'); | |
src: url($rel_url + '.eot?#iefix') format('embedded-opentype'), | |
url($rel_url + '.woff') format('woff'), | |
url($rel_url + '.ttf') format('truetype'), | |
url($rel_url + '.svg#' + $url) format('svg'); | |
font-weight: $width; | |
font-style: normal; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment