From 3803406298bdd84d91f38b3622d856306f4ef2a7 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Tue, 5 Dec 2023 14:25:55 +0000 Subject: [PATCH] [FIX] website: fix misaligned elements in headers This commit correctly aligns certain header elements when the CTA button has a larger vertical padding. Steps to reproduce the issue: - Install 'eCommerce' on your website. - In Website edit mode, click on the 'THEME' tab. - Adjust the vertical padding of buttons to 25px. - Click on the header in the page. - In the 'STYLE' tab, select the 'Menu - Sales 1' header. - Bug: The 'logo" and the 'menu items' are not aligned with the CTA button. - In the 'STYLE' tab, select the 'Menu - Sales 2' header. - Bug: The 'menu items' are not aligned with the CTA button. - In the 'STYLE' tab, select the 'Menu - Sales 4' header. - Bug: Bug: The 'cart' button is not aligned with the CTA button. task-3478334 closes odoo/odoo#145683 X-original-commit: d2f6710bcaa5cee7e77fc4df902929264ffa4830 Signed-off-by: Outagant Mehdi (mou) --- addons/website/static/src/scss/website.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index 22c9c5f9b1c..0a92112ea49 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -1184,12 +1184,20 @@ header { @include o-apply-colors('header-sales_one-custom'); @include o-add-gradient('menu-secondary-gradient'); } + header#top > nav:not(.o_header_mobile) #o_main_nav > .container { + // TODO: remove in master and add "align-items-center" in the XML. + align-items: center; + } } @else if o-website-value('header-template') == 'sales_two' { #wrapwrap .o_header_sales_two_top { @include o-apply-colors('header-sales_two'); @include o-apply-colors('header-sales_two-custom'); @include o-add-gradient('menu-secondary-gradient'); } + header#top > nav:not(.o_header_mobile) #o_main_nav #top_menu { + // TODO: remove in master and add "align-items-center" in the XML. + align-items: center; + } } @else if o-website-value('header-template') == 'sales_three' { #wrapwrap .o_header_sales_three_top { @include o-apply-colors('header-sales_three'); @@ -1202,6 +1210,10 @@ header { @include o-apply-colors('header-sales_four-custom'); @include o-add-gradient('menu-secondary-gradient'); } + header#top > nav:not(.o_header_mobile) #o_main_nav .navbar-nav { + // TODO: remove in master and add "align-items-center" in the XML. + align-items: center; + } } .o_grid_header_3_cols {