Created
October 11, 2017 17:42
-
-
Save AlexandrBukhtatyy/e8fca751185b9f6feb149c9e70d88672 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
$fonts-list: "DINPro-Regular" "DINPro-Bold" "DINPro-Medium"; | |
@mixin gen-fonts { | |
@each $font in $fonts-list{ | |
@font-face { | |
font-family: '#{$font}'; | |
src: url('../fonts/#{$font}.eot'); /* IE9 Compat Modes */ | |
src: url('../fonts/#{$font}.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ | |
url('../fonts/#{$font}.woff2') format('woff2'), /* Super Modern Browsers */ | |
url('../fonts/#{$font}.woff') format('woff'), /* Pretty Modern Browsers */ | |
url('../fonts/#{$font}.ttf') format('truetype'), /* Safari, Android, iOS */ | |
url('../fonts/#{$font}.svg#svgFontName') format('svg'); /* Legacy iOS */ | |
font-style: normal; | |
} | |
} | |
} | |
@include gen-fonts(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment