From 12f820ac64f0a2dcb1eeebb0af249e5eb93d8539 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:55:12 +0100 Subject: [PATCH] XWIKI-21864: Menu Application: If list element is a link, the xDropdown-header-toggle drops to a new line and other weirdness (#2893) (#2900) * Fixed incorrect padding on link section headers in the submenus * Positioned the toggle absolutely in those sections so that it doesn't eat away at space the text had before and force a linebreak where there used to be none. (cherry picked from commit 6526e788eae5cd1abfcec5f8d6726d6824d0da56) Co-authored-by: Lucas C --- .../src/main/resources/Menu/MenuMacro.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xwiki-platform-core/xwiki-platform-menu/xwiki-platform-menu-ui/src/main/resources/Menu/MenuMacro.xml b/xwiki-platform-core/xwiki-platform-menu/xwiki-platform-menu-ui/src/main/resources/Menu/MenuMacro.xml index a4d720184d73..fd97728a1ae6 100644 --- a/xwiki-platform-core/xwiki-platform-menu/xwiki-platform-menu-ui/src/main/resources/Menu/MenuMacro.xml +++ b/xwiki-platform-core/xwiki-platform-menu/xwiki-platform-menu-ui/src/main/resources/Menu/MenuMacro.xml @@ -853,10 +853,17 @@ require(['jquery','xwiki-l10n!menu-ui-translation-keys'], function($, l10n) { } } /* When in dropdown we also have a link, reset the duplicated padding */ - & > span > a { + & > .xDropdown-header > span > a { padding: 0; display: inherit; } + /* Reposition the toggle when in a dropdown of fixed size + to avoid eating away at the bit of space we have for the text. */ + & > .xDropdown-header > .xDropdown-header-toggle { + position: absolute; + right: 0; + top: 0; + } } /* Separator horizontal inside menu */ &:empty {