From 079b9556c6aa4a8a8c3a0d2a967e719dfd985662 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Fri, 16 Apr 2021 07:27:09 +0000 Subject: [PATCH] [FIX] website: fix top position of modal Before this commit, the top position of a modal in website was always the height of the main menu navbar. Even if the main menu navbar was not displayed when the user is not logged. That bug was introduced in 6ef622772f7d0172553aca6dbce9eb71855460d7 After this commit, the top position of a modal is the height of the main menu navbar but only if that navbar is displayed. task-2507949 closes odoo/odoo#69391 X-original-commit: 00ab01d05b3876c5d926e16b9a5d65ace4df7360 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/scss/website.scss | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index d20eb96f34b..bc6fc936f1f 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -87,11 +87,6 @@ $-seen-urls: (); } #wrapwrap { - // When the modal is in #wrapwrap, position top should be size of the navbar - .modal:not(.s_popup_bottom) { - top: $o-navbar-height; - } - @if o-website-value('body-image') { background-image: url("/#{str-slice(o-website-value('body-image'), 2)}"); background-position: center; @@ -181,6 +176,13 @@ $-seen-urls: (); } } +#oe_main_menu_navbar:not(.o_hidden) + #wrapwrap { + .o_header_affixed, .modal:not(.s_popup_bottom) { + // For these elements, in #wrapwrap, position top should be size of the navbar + top: $o-navbar-height; + } +} + .navbar { .navbar-collapse { @@ -770,9 +772,6 @@ $-transition-duration: 200ms; } } } -#oe_main_menu_navbar + #wrapwrap .o_header_affixed { - top: $o-navbar-height; -} // Navbar .navbar .o_extra_menu_items.show > ul {