[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) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2020-10-08 07:45:14 +00:00
parent 87b8408f24
commit 5a594fd8a7
+5 -3
View File
@@ -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