From 3168ae5fcc0a495d726f3c0254863aff215d3296 Mon Sep 17 00:00:00 2001 From: "stefanorigano (SRI)" Date: Thu, 1 Jun 2023 06:09:39 +0000 Subject: [PATCH] [FIX] web: `Dropdown`, adjust menu position task-3338419 X-original-commit: 37dfaf8fa19746e90974b21b3f9dfae1f2be2233 Part-of: odoo/odoo#124903 --- addons/web/static/src/core/dropdown/dropdown.scss | 6 ++++++ addons/web/static/src/core/dropdown/dropdown.xml | 6 +++++- addons/web/static/src/webclient/navbar/navbar.scss | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/core/dropdown/dropdown.scss b/addons/web/static/src/core/dropdown/dropdown.scss index f250c5de02c..3a059e39ac8 100644 --- a/addons/web/static/src/core/dropdown/dropdown.scss +++ b/addons/web/static/src/core/dropdown/dropdown.scss @@ -5,6 +5,12 @@ // Makes sure the dropdown menus are already in a // fixed position before the positioning computations begin. position: fixed; + margin-top: var(--Dropdown_menu-margin-y, #{map-get($spacers, 1)}); + margin-bottom: var(--Dropdown_menu-margin-y, #{map-get($spacers, 1)}); + + &.o-dropdown--menu-submenu { + --Dropdown_menu-margin-y: 0; + } .dropdown-toggle:focus, .dropdown-item:focus { background-color: transparent; diff --git a/addons/web/static/src/core/dropdown/dropdown.xml b/addons/web/static/src/core/dropdown/dropdown.xml index dbcd24aff1b..c1e0c413fb2 100644 --- a/addons/web/static/src/core/dropdown/dropdown.xml +++ b/addons/web/static/src/core/dropdown/dropdown.xml @@ -33,7 +33,11 @@