From eafb6c95b7364965cd3e2ff7667c8466b6a802ff Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 30 Apr 2025 16:46:31 +0200 Subject: [PATCH] menu: Align badges correctly and ellipsize text again --- public/css/icinga/menu.less | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/public/css/icinga/menu.less b/public/css/icinga/menu.less index c0e1bd030..6324190ca 100644 --- a/public/css/icinga/menu.less +++ b/public/css/icinga/menu.less @@ -69,10 +69,9 @@ } > a { - padding-left: .75em; + // To center the content, padding top is: height - line-height / 2 + padding: ~"calc((@{nav-item-height} - 1.5em) / 2) .5em .5em .75em"; height: @nav-item-height; - display: flex; - align-items: center; } &.active:not(.selected) > a:focus, @@ -98,6 +97,10 @@ } } +#layout:not(.minimal-layout).sidebar-collapsed #menu .nav-level-1 > .nav-item > a { + padding: ~"calc((@{nav-item-height} - 2em) / 2) .5em .5em .5em"; +} + #menu ul:not(.nav-level-2) > .selected > a { background-color: @menu-highlight-color; color: @text-color-inverted; @@ -236,9 +239,7 @@ // Badge offset correction #menu > nav > .nav-level-1 > .badge-nav-item > a > .badge { - margin-top: 0.2em; margin-left: auto; - order: 1; // It's the only positioned element in the flex container, hence 1 moves it to the right most position } #menu .nav-level-2 > .badge-nav-item > a > .badge {