[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
This commit is contained in:
qsm-odoo
2022-09-26 11:36:49 +02:00
parent 362e93ddaf
commit 0087f2746e
@@ -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,