From cf60a783fc6ecc3c9d1fc1966ba7434eb84afd0d Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 23 Sep 2019 13:17:35 +0000 Subject: [PATCH] [REF] website: make the google font "Roboto" the default website font Before this commit, the default font for the website was the bootstrap one, which is a series of many fonts which should at least contain one which is present on every user system. The problem is that commit https://github.com/odoo/odoo/commit/ed18095127b20da516fa5ada943b2dd6d5c84652 added the definition of a Roboto font, available in all assets... and Roboto is part of the bootstrap font. This added a new font loading on page load and that loading is not optimized at the moment. This thus broke our work to improve google pagespeed ratings. This commit replaces the bootstrap font with a forced Roboto font whose loading is handled by an optimized loading of the related google font. This also improves the very default font of the website by making it more stable accross different browser (we will always use the loaded Roboto font instead of relying on the user system fonts). Part of https://github.com/odoo/odoo/pull/37293 --- addons/website/static/src/scss/primary_variables.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/website/static/src/scss/primary_variables.scss b/addons/website/static/src/scss/primary_variables.scss index e3d87ae98c4..102b0e9abb8 100644 --- a/addons/website/static/src/scss/primary_variables.scss +++ b/addons/website/static/src/scss/primary_variables.scss @@ -69,7 +69,7 @@ $o-user-website-values: () !default; //------------------------------------------------------------------------------ $o-theme-fonts: ( - (-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Noto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"), // This is BS default + ('Roboto', Noto, sans-serif), ('Open Sans', sans-serif), ('Source Sans Pro', sans-serif), ('Raleway', sans-serif), @@ -77,7 +77,7 @@ $o-theme-fonts: ( ('Arvo', Times, serif), ) !default; $o-theme-font-urls: ( - null, + 'Roboto:400,400i,700,700i', 'Open+Sans:400,400i,700,700i', 'Source+Sans+Pro:400,400i,700,700i', 'Raleway:400,400i,700,700i', @@ -85,7 +85,7 @@ $o-theme-font-urls: ( 'Arvo:400,400i,700,700i', ) !default; $o-theme-font-names: ( - 'Bootstrap', + 'Roboto', 'Open Sans', 'Source Sans Pro', 'Raleway',