[IMP] website: add swap parameter to fonts import URL

Google fonts now support custom font displaying, which allow us to
swap the font when it is loaded. Especially useful for high latency
connections.

Ref: https://addyosmani.com/blog/google-fonts-font-display/

task-2069043

closes odoo/odoo#36696

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
fja-odoo
2019-09-17 08:16:18 +00:00
committed by qsm-odoo
parent 9c8c8c4c8b
commit 6b73ab03f8
2 changed files with 2 additions and 2 deletions
@@ -1,6 +1,6 @@
@each $url in $o-theme-font-urls {
@if $url {
@import url("https://fonts.googleapis.com/css?family=#{unquote($url)}");
@import url("https://fonts.googleapis.com/css?family=#{unquote($url)}&display=swap");
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ $-font-numbers: (
$-seen: append($-seen, $-number);
$-theme-font: nth($o-theme-font-urls, $-number);
@if $-theme-font {
@import url("https://fonts.googleapis.com/css?family=#{unquote($-theme-font)}");
@import url("https://fonts.googleapis.com/css?family=#{unquote($-theme-font)}&display=swap");
}
}
}