Skip to content

Commit 7c83388

Browse files
committed
Remove the z-index inside teh button in the menu-item
1 parent 3410b46 commit 7c83388

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

packages/uui-menu-item/lib/uui-menu-item.element.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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`<button
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>`
@@ -266,12 +266,8 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
266266
267267
/** Not active, not selected, not disabled: */
268268
: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 {
269+
#menu-item:has(#label-button:hover)
270+
#label-button-background {
275271
background-color: var(
276272
--uui-menu-item-background-color-hover,
277273
var(--uui-color-surface-emphasis)
@@ -480,7 +476,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
480476
background-color: transparent;
481477
cursor: pointer;
482478
min-height: var(--uui-size-12);
483-
z-index: 1;
479+
/* z-index: 1; */
484480
}
485481
486482
#label-button {
@@ -498,7 +494,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
498494
text-decoration: none;
499495
color: currentColor;
500496
min-height: var(--uui-size-12);
501-
z-index: 1;
497+
/* z-index: 1; */
502498
font-weight: inherit;
503499
}
504500

0 commit comments

Comments
 (0)