aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/sass
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-05-01 23:22:58 +0200
committerRigel Kent <sendmemail@rigelk.eu>2020-05-01 23:22:58 +0200
commitd392608090a88a402f98f57cb60872dfd3506fd4 (patch)
treeb98aebf8f4ba5188074915593c6a7fe92281f2ff /client/src/sass
parentca4b1594a77d1a31188dde1e5f6f7a900cd29118 (diff)
downloadPeerTube-d392608090a88a402f98f57cb60872dfd3506fd4.tar.gz
PeerTube-d392608090a88a402f98f57cb60872dfd3506fd4.tar.zst
PeerTube-d392608090a88a402f98f57cb60872dfd3506fd4.zip
Clearer font definitons via a font-face mixin
Diffstat (limited to 'client/src/sass')
-rw-r--r--client/src/sass/include/_fonts.scss61
1 files changed, 19 insertions, 42 deletions
diff --git a/client/src/sass/include/_fonts.scss b/client/src/sass/include/_fonts.scss
index 46cd37971..dd1cbadb3 100644
--- a/client/src/sass/include/_fonts.scss
+++ b/client/src/sass/include/_fonts.scss
@@ -1,46 +1,23 @@
1$FontPathSourceSansPro: '~npm-font-source-sans-pro/fonts'; 1$FontPathSourceSansPro: '~npm-font-source-sans-pro/fonts';
2$basePath: '#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro';
2 3
3@font-face { 4@mixin fontface($name, $path, $weight: null, $style: null, $exts: woff2) {
4 font-family: 'Source Sans Pro'; 5 $src: null;
5 font-weight: 400; 6 @each $ext in $exts {
6 font-style: normal; 7 $src: append($src, url(quote($path + "." + $ext)) format(quote($ext)), comma);
7 font-stretch: normal; 8 }
8 font-display: swap; 9 @font-face {
9 src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-Regular.ttf.woff2') format('woff2'), 10 font-family: quote($name);
11 font-weight: $weight;
12 font-style: $style;
13 font-stretch: normal;
14 font-display: swap;
15 src: $src;
16 }
10} 17}
11 18
12@font-face { 19@include fontface('Source Sans Pro', '#{$basePath}-Regular.ttf', 400, normal);
13 font-family: 'Source Sans Pro'; 20@include fontface('Source Sans Pro', '#{$basePath}-It.ttf', 400, italic);
14 font-weight: 400; 21@include fontface('Source Sans Pro', '#{$basePath}-Semibold.ttf', 600, normal);
15 font-style: italic; 22@include fontface('Source Sans Pro', '#{$basePath}-SemiboldIt.ttf', 600, italic);
16 font-stretch: normal; 23@include fontface('Source Sans Pro', '#{$basePath}-Bold.ttf', 700, normal); \ No newline at end of file
17 font-display: swap;
18 src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-It.ttf.woff2') format('woff2'),
19}
20
21@font-face {
22 font-family: 'Source Sans Pro';
23 font-weight: 600;
24 font-style: normal;
25 font-stretch: normal;
26 font-display: swap;
27 src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-Semibold.ttf.woff2') format('woff2'),
28}
29
30@font-face {
31 font-family: 'Source Sans Pro';
32 font-weight: 600;
33 font-style: italic;
34 font-stretch: normal;
35 font-display: swap;
36 src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-SemiboldIt.ttf.woff2') format('woff2'),
37}
38
39@font-face {
40 font-family: 'Source Sans Pro';
41 font-weight: 700;
42 font-style: normal;
43 font-stretch: normal;
44 font-display: swap;
45 src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-Bold.ttf.woff2') format('woff2'),
46} \ No newline at end of file