diff options
author | Jonas Smedegaard <dr@jones.dk> | 2024-02-11 14:21:00 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2024-02-11 16:28:49 +0100 |
commit | 4700797fdd790b4ad7fb4bd0459519bb0bd12b3c (patch) | |
tree | 20a781a82f058a5cb070c3ee253c8c711229ad2e /styles.scss | |
parent | aec4b7c8d8f6bd8e68b106d99f23f0770033d9bf (diff) |
embed font ETbb
Diffstat (limited to 'styles.scss')
-rw-r--r-- | styles.scss | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/styles.scss b/styles.scss new file mode 100644 index 0000000..39a3282 --- /dev/null +++ b/styles.scss @@ -0,0 +1,26 @@ +// origin: https://stackoverflow.com/a/75470197/18619283 + +/*-- scss:defaults --*/ + +// avoid web-loading internally declared default Bootswatch font +$web-font-path: ""; + +/*-- scss:mixins --*/ + +@mixin font-face($name, $style, $weight, $basedir, $file) { + @font-face { + font-display: swap; + font-family: #{$name}; + font-style: #{$style}; + font-weight: #{$weight}; + src: url("fonts/#{$basedir}/woff2/#{$file}.woff2") format("woff2"), + url("fonts/#{$basedir}/opentype/#{$file}.otf") format("opentype"); + } +} + +/*-- scss:rules --*/ + +@include font-face(ETbb, normal, 400, etbb, ETbb-Regular); +@include font-face(ETbb, italic, 400, etbb, ETbb-Italic); +@include font-face(ETbb, normal, 700, etbb, ETbb-Bold); +@include font-face(ETbb, italic, 700, etbb, ETbb-BoldItalic); |