Skip to content

Commit

Permalink
[IMP] website: optimize CSS for mobile navbar background color
Browse files Browse the repository at this point in the history
The `o-bg-color` mixin was used to color the mobile navbar: it was
useless. First, in general, `o-bg-color` should rarely be used:
`o-apply-color` is best as it will call the other one when needed. Then,
this comes with many extra rules to color the text, inner subtitle, etc.
All of those rules are already inherited from the parent navbar: we only
want to re-apply the background-color on a sub element (the mobile
navbar) in this case.

Part-of: odoo#141198
  • Loading branch information
qsm-odoo committed Nov 7, 2023
1 parent 54afc13 commit d9c0b8f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions addons/website/static/src/scss/website.scss
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,8 @@ $-seen-urls: ();

// Apply background color to the offcanvas menu
.o_navbar_mobile {
$-menu-color: o-color('menu-custom') or o-color('menu');

@include o-bg-color($-menu-color);

height: 100dvh;
background-color: o-color('menu-custom') or o-color('menu');
}

$-header-nav-link-height: $nav-link-height;
Expand Down

0 comments on commit d9c0b8f

Please sign in to comment.