2
0

_mixins.fonts.scss 715 B

1234567891011121314151617181920212223242526
  1. /*
  2. NB: Due to Wagtail's browser support the following @font-face formats are required:
  3. - WOFF for modern browsers
  4. - WOFF2 For super-modern browsers
  5. This example is all we need now:
  6. @font-face {
  7. font-family: 'MyWebFont';
  8. src: url('myfont.woff2') format('woff2'),
  9. url('myfont.woff') format('woff');
  10. }
  11. See https://css-tricks.com/snippets/css/using-font-face/ for more information.
  12. */
  13. @mixin webfont($fontname, $filestub, $weight, $style:normal) {
  14. @font-face {
  15. font-family: '#{$fontname}';
  16. src: url('#{$font-root}#{$filestub}.woff2') format('woff2'),
  17. url('#{$font-root}#{$filestub}.woff') format('woff');
  18. font-weight: $weight;
  19. font-style: $style;
  20. }
  21. }