diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index 6c04ea931ea..ffd323d8b6e 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -1222,7 +1222,7 @@ header { .o_mega_menu { width: 100%; padding: 0; - margin-top: 0; + margin-top: 0 !important; border-radius: 0; background-clip: unset; // Remove the 1px gap introduced by BS4 background-color: transparent; // In order to allow the mega menu to be transparent diff --git a/addons/website/static/tests/tours/edit_menus.js b/addons/website/static/tests/tours/edit_menus.js index fdf5e2ae224..93bbe91df44 100644 --- a/addons/website/static/tests/tours/edit_menus.js +++ b/addons/website/static/tests/tours/edit_menus.js @@ -240,6 +240,11 @@ wTourUtils.registerWebsitePreviewTour('edit_menus', { content: "When the mega menu is opened, scroll up", trigger: 'iframe #top_menu .o_mega_menu_toggle.show', run: function () { + const marginTopOfMegaMenu = getComputedStyle( + this.$anchor[0].closest('.dropdown').querySelector('.o_mega_menu'))['margin-top']; + if (marginTopOfMegaMenu !== '0px') { + console.error('The margin-top of the mega menu should be 0px'); + } // Scroll up. this.$anchor[0].closest('body').querySelector('.s_media_list_item:nth-child(2)') .scrollIntoView(true);