From 0087f2746e43c6043dd59bf175fb7f461fb5bad1 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 22 Sep 2022 11:27:28 +0000 Subject: [PATCH] [FIX] website: properly show website fonts in editor panel in themes Before this commit, if a theme defined in its website values "palette" "null" as value for the "headings-font" variable, it was properly making the headings font use the default "body" font as expected but the editor panel showed an empty value instead of displaying the "body" font value. Now, that panel UI problem is fixed for the headings, navbar and buttons fonts. Note that all our current themes force the font for each of those component so the bug was never visible anyway. That's why it is merged here in 16.0 and not before but it could be backported if necessary (although it is only an UI bug which is not really confusing). Before this commit, for a theme which says "use XXX as main font" and "let headings follow the main font", the UI displayed: Main font: XXX Headings font: / After this commit, it displays: Main font: XXX Headings: XXX task-2993054 X-original-commit: b07a408f2f80638a2abdda8304e31d3dac9968b3 Part-of: odoo/odoo#101068 --- addons/website/static/src/scss/website.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index c26425acf8f..d99ebe2ff82 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -23,6 +23,11 @@ $-seen-urls: (); // 1) Handle default values @include print-variable('header-font-size', $font-size-base); + $-font-website-value: o-website-value('font'); + @include print-variable('headings-font', $-font-website-value); + @include print-variable('navbar-font', $-font-website-value); + @include print-variable('buttons-font', $-font-website-value); + // 2) The values in the $theme-colors map are already printed by Bootstrap. // 3) The values in the $colors map are also printed by Bootstrap. However,