lnked/react-starter

View on GitHub
src/assets/styles/mixins/_fontface.scss

Summary

Maintainability
Test Coverage
@mixin font-face($font-family, $file-filename, $font-weight: normal, $font-style: normal, $font-stretch : normal) {
  @font-face {
    font-family: quote($font-family);
    font-weight: $font-weight;
    font-style: $font-style;
    font-stretch: $font-stretch;
    font-display: optional;
    src: url($file-filename + '.eot');
    src: url($file-filename + '.woff2') format('woff2'), url($file-filename + '.woff') format('woff');
  }
}

/*
100 - Thin
200 - Extra Light (Ultra Light)
300 - Light
400 - Normal
500 - Medium
600 - Semi Bold (Demi Bold)
700 - Bold
800 - Extra Bold (Ultra Bold)
900 - Black (Heavy)

'extrathin': 50,
'hairline': 50,
'ultrathin': 50,
'thin': 100,
'extralight': 200,
'ultralight': 200,
'light': 300,
'book': 400,
'normal': 400,
'plain': 400,
'regular': 400,
'medium': 500,
'demibold': 600,
'semibold': 600,
'bold': 700,
'extrabold': 800,
'heavy': 800,
'ultrabold': 800,
'black': 900,
'extrablack': 950,
'fat': 950,
'poster': 950,
'ultrablack': 950
*/