Skip to content

Instantly share code, notes, and snippets.

@chobitV
Created September 15, 2017 14:02
Show Gist options
  • Save chobitV/3e4acb030edb1b3e0983e609c351011d to your computer and use it in GitHub Desktop.
Save chobitV/3e4acb030edb1b3e0983e609c351011d to your computer and use it in GitHub Desktop.

Revisions

  1. chobitV created this gist Sep 15, 2017.
    25 changes: 25 additions & 0 deletions [scss] font-face-mini mixin
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    // =============================================================================
    // FONT FACE MINI
    // =============================================================================

    @mixin font-face-mini($font-name, $font-style, $font-weight, $filename, $path, $font-display: block) {
    @font-face {
    font-family: '#{$font-name}';
    font-style: $font-style;
    font-weight: $font-weight;
    font-display: $font-display;
    src: local('#{$font-name}'),
    url('#{unquote($path)}#{$filename}.woff2') format('woff2'),
    url('#{unquote($path)}#{$filename}.woff') format('woff');
    unicode-range:
    U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, // Cyrillic
    U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F, // Cyrillic-ext
    U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, // Latin
    U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; // Latin-ext
    }
    }

    // use
    // @include font-face("font name", font-style, font-weight, filename, path, font-display);

    // end FONT FACE