Skip to content

Conversation

engijlr
Copy link
Contributor

@engijlr engijlr commented Oct 3, 2025

Summary

This removes the local stacking context from uui-menu-item. We keep hover/active visuals using :has() and an earlier #label-button-background element.

Why

-Today, uui-menu-item sets z-index: 1 on the label/button to stay above #label-button-background.
-Side effect: it creates a stacking fight so components like the signs popover render under the menu item.
-We want predictable stacking (paint order), so overlays/tooltips/popovers aren’t blocked.

What changed

-Removed the hard z-index: 1 on the clickable label/button.
-Moved #label-button-background to render before the label/button in the DOM.
-Replaced sibling combinator ~ hover logic with :has() so hover/focus styles still work when the background comes first.

This keeps the label clickable (the background can’t steal pointer events) and avoids the stacking wall.

@engijlr engijlr requested a review from nielslyngsoe October 3, 2025 10:28
Copy link

github-actions bot commented Oct 3, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1192.westeurope.azurestaticapps.net

Copy link

github-actions bot commented Oct 3, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1192.westeurope.azurestaticapps.net

@nielslyngsoe nielslyngsoe marked this pull request as ready for review October 6, 2025 12:45
@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 12:45
@nielslyngsoe nielslyngsoe enabled auto-merge (squash) October 6, 2025 12:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes local stacking context issues from uui-menu-item by eliminating z-index usage and reordering DOM elements to maintain visual styling without blocking overlays.

  • Removed hardcoded z-index: 1 from label and button elements
  • Moved #label-button-background element to render before the label/button in DOM order
  • Updated CSS selectors from sibling combinators to :has() pseudo-class for hover states

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

github-actions bot commented Oct 6, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1192.westeurope.azurestaticapps.net

Copy link

sonarqubecloud bot commented Oct 6, 2025

Copy link

github-actions bot commented Oct 6, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1192.westeurope.azurestaticapps.net

@nielslyngsoe nielslyngsoe merged commit e7d1ef9 into main Oct 6, 2025
11 of 12 checks passed
@nielslyngsoe nielslyngsoe deleted the v1/bugfix/menu-item-z-index branch October 6, 2025 14:15
@iOvergaard iOvergaard added the feature Something we are looking to build label Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something we are looking to build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants