Skip to content

Instantly share code, notes, and snippets.

@AlexandrBukhtatyy
Created October 11, 2017 17:42
Show Gist options
  • Save AlexandrBukhtatyy/e8fca751185b9f6feb149c9e70d88672 to your computer and use it in GitHub Desktop.
Save AlexandrBukhtatyy/e8fca751185b9f6feb149c9e70d88672 to your computer and use it in GitHub Desktop.
Миксин для генерации правил шрифтов
$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