Skip to content

Commit c2abbb8

Browse files
committed
css: Use a proper height for level 1 menu items
Helps with aligning the flyout caret next
1 parent 025ae94 commit c2abbb8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

public/css/icinga/menu.less

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
}
88
}
99

10+
@nav-item-height: 3.166666667em; // 38px
1011
@icon-width: 1.7em; // 1.5em width + 0.2em right margin
1112

1213
#menu {
@@ -51,7 +52,6 @@
5152
}
5253

5354
#menu .nav-level-1 > .nav-item {
54-
line-height: 2.167em; // 26 px
5555
color: @menu-color;
5656

5757
&.active {
@@ -70,6 +70,9 @@
7070

7171
> a {
7272
padding: 0.5em 0.5em 0.5em .75em;
73+
height: @nav-item-height;
74+
display: flex;
75+
align-items: center;
7376
}
7477

7578
&.active:not(.selected) > a:focus,
@@ -114,8 +117,8 @@
114117
content: "";
115118
display: block;
116119
height: 1.25em;
117-
margin-top: -1.75em;
118120
width: 1.25em;
121+
top: ~"calc(50% - (1.25em / 2))";
119122
}
120123
}
121124

@@ -150,7 +153,7 @@
150153
height: 1.25em;
151154
width: 1.25em;
152155
position: absolute;
153-
top: .5em;
156+
top: ~"calc(50% - (1.25em / 2))";
154157
right: -.75em;
155158
z-index: 3;
156159
}
@@ -234,6 +237,8 @@
234237
// Badge offset correction
235238
#menu > nav > .nav-level-1 > .badge-nav-item > a > .badge {
236239
margin-top: 0.2em;
240+
margin-left: auto;
241+
order: 1; // It's the only positioned element in the flex container, hence 1 moves it to the right most position
237242
}
238243

239244
#menu .nav-level-2 > .badge-nav-item > a > .badge {

0 commit comments

Comments
 (0)