@@ -217,6 +217,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
217217 render ( ) {
218218 return html `
219219 <div id= "menu-item" aria-label = "menuitem" role= "menuitem">
220+ <div id= "label-button-background" > </ div>
220221 ${ this . hasChildren
221222 ? html `<butto n
222223 id= "caret-button"
@@ -231,7 +232,6 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
231232 ? this . _renderLabelAsAnchor ( )
232233 : this . _renderLabelAsButton ( ) }
233234
234- <div id= "label-button-background" > </ div>
235235 <slot id= "actions-container" name = "actions"> </ slot>
236236 ${ this . loading
237237 ? html `<uui- loader- bar id= "loader" > </ uui- loader- bar> `
@@ -265,13 +265,10 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
265265 }
266266
267267 /** Not active, not selected, not disabled: */
268+ /* Only when NOT active/selected/disabled/highlight … */
268269 : host (: not ([active ], [selected ], [disabled ], [select-mode = 'highlight' ]))
269- # menu-item
270- # label-button : hover
271- ~ # label-button-background ,
272- : host (: not ([active ], [selected ], [disabled ]))
273- # menu-item
274- # caret-button : hover {
270+ # menu-item : has (# label-button : hover )
271+ # label-button-background {
275272 background-color : var (
276273 --uui-menu-item-background-color-hover ,
277274 var (--uui-color-surface-emphasis )
@@ -480,7 +477,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
480477 background-color : transparent;
481478 cursor : pointer;
482479 min-height : var (--uui-size-12 );
483- z-index : 1 ;
480+ // z-index: 1;
484481 }
485482
486483 # label-button {
@@ -498,7 +495,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
498495 text-decoration : none;
499496 color : currentColor;
500497 min-height : var (--uui-size-12 );
501- z-index : 1 ;
498+ // z-index: 1;
502499 font-weight : inherit;
503500 }
504501
@@ -557,12 +554,18 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
557554
558555 # badge {
559556 font-size : 12px ;
557+ //Why is this duplicated?
560558 --uui-badge-position : relative;
561559 --uui-badge-position : auto;
562560 display : block;
563561 margin-left : 6px ;
564562 }
565563
564+ # label-button ::slotted (uui-badge ) {
565+ position : relative;
566+ z-index : 1 ;
567+ }
568+
566569 /** Focus styling */
567570
568571 : host ([select-mode = 'highlight' ]) # label-button : focus-visible {
0 commit comments