From 5a594fd8a714954e72285f166240cd23b393b479 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Tue, 6 Oct 2020 13:46:39 +0000 Subject: [PATCH] [FIX] website: properly set button font family for navbar buttons Since 13.0, the website menu can contain text and buttons through mega menus, which created inconsistencies on the way the "navbar font" configuration works. Indeed, when setting the "button font", navbar buttons were updated too... except if that "button font" was equal to the "text font", in that case those buttons used the "navbar font", so not logical at all. This commit solves the problem by only using the navbar font to style bootstrap nav links, which is the common content of mega menu snippets anyway but this has a side-effect: text-in-navbar font may change from navbar font to text font which is acceptable as the 14.0 was released very recently. Sorry for the inconvenience if any, but it felt important to fix the problem that way for the new static content of header templates. closes odoo/odoo#59459 X-original-commit: 31bfb5075063070d24a607ed47da6bdd8207aa5a Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/scss/website.scss | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index 75ad08b89fb..bd035de65ba 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -182,9 +182,6 @@ $-seen-urls: (); } .navbar { - @if ($o-theme-navbar-font != $o-theme-font) { - font-family: $o-theme-navbar-font; - } .navbar-collapse { min-width: 0; // Allows it to shrink during loading @@ -207,6 +204,11 @@ $-seen-urls: (); } } } +.navbar-brand, .navbar-text, .navbar .nav-link { + @if $o-theme-navbar-font != $o-theme-font { + font-family: $o-theme-navbar-font; + } +} .navbar-light { // Style only navbar-light which Odoo is only supposed to use in standard