summaryrefslogtreecommitdiff
path: root/styles/main.scss
blob: f0c0279d1af5472e131cb541ba69bbeecbf06f0c (plain)
  1. // origin: https://stackoverflow.com/a/75470197/18619283
  2. /*-- scss:defaults --*/
  3. // avoid web-loading internally declared default Bootswatch font
  4. $web-font-path: "";
  5. // fix apply font family setting seemingly missed by quarto
  6. $font-family-sans-serif: "Cabin";
  7. // use sans-serif for headers and menus
  8. $headings-font-family: $font-family-sans-serif;
  9. $display-font-family: $font-family-sans-serif;
  10. $input-btn-font-family: $font-family-sans-serif;
  11. /*-- scss:mixins --*/
  12. @mixin font-face($name, $style, $weight, $basedir, $file) {
  13. @font-face {
  14. font-display: swap;
  15. font-family: #{$name};
  16. font-style: #{$style};
  17. font-weight: #{$weight};
  18. src: url("fonts/#{$basedir}/woff2/#{$file}.woff2") format("woff2"),
  19. url("fonts/#{$basedir}/opentype/#{$file}.otf") format("opentype");
  20. }
  21. }
  22. /*-- scss:rules --*/
  23. @include font-face(ETbb, normal, 400, etbb, ETbb-Regular);
  24. @include font-face(ETbb, italic, 400, etbb, ETbb-Italic);
  25. @include font-face(ETbb, normal, 700, etbb, ETbb-Bold);
  26. @include font-face(ETbb, italic, 700, etbb, ETbb-BoldItalic);
  27. @include font-face(Cabin, normal, "400 700", cabin, "Cabin-Regular-VF");
  28. @include font-face(Cabin, italic, "400 700", cabin, "Cabin-Italic-VF");
  29. @include font-face(InconsolataN, normal, 400, inconsolata, InconsolataN-Regular);
  30. @include font-face(InconsolataN, normal, 700, inconsolata, InconsolataN-Bold);