Repository navigation
fix(topnav): move mega menu stacking context to nav sections - #378
Merged
Merged
Conversation
…ment PR #377 incorrectly added position:relative + z-index to the <nav> element, which made it the positioned ancestor for the MegaMenu backdrop — breaking the unified card visual. The correct fix is to add the stacking context to the nav's content sections (leftSection, centerContent, rightSection, endContent) so they sit above the backdrop (z-index 99) while the backdrop still positions relative to the outer wrapper. Co-authored-by: Navi <[email protected]>
rubyycheung
enabled auto-merge
February 27, 2026 04:02
rubyycheung
added this pull request to the merge queue
Feb 27, 2026
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsTopNav · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Component PreviewsIncludes interactive hover previews as animated GIFs. XDSTopNavDefaultScreenshot: Interaction Preview: (view video) View in Storybook · Centered With Start ContentScreenshot: View in Storybook · Center Content Without EndScreenshot: View in Storybook · Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
This was referenced Mar 3, 2026
cixzhang
pushed a commit
that referenced
this pull request
Apr 26, 2026
…ment (#378) PR #377 incorrectly added position:relative + z-index to the <nav> element, which made it the positioned ancestor for the MegaMenu backdrop — breaking the unified card visual. The correct fix is to add the stacking context to the nav's content sections (leftSection, centerContent, rightSection, endContent) so they sit above the backdrop (z-index 99) while the backdrop still positions relative to the outer wrapper. Co-authored-by: Navi <[email protected]>
cixzhang
pushed a commit
that referenced
this pull request
Jun 21, 2026
…ment (#378) PR #377 incorrectly added position:relative + z-index to the <nav> element, which made it the positioned ancestor for the MegaMenu backdrop — breaking the unified card visual. The correct fix is to add the stacking context to the nav's content sections (leftSection, centerContent, rightSection, endContent) so they sit above the backdrop (z-index 99) while the backdrop still positions relative to the outer wrapper. Co-authored-by: Navi <[email protected]>
cixzhang
pushed a commit
that referenced
this pull request
Jun 21, 2026
…ment (#378) PR #377 incorrectly added position:relative + z-index to the <nav> element, which made it the positioned ancestor for the MegaMenu backdrop — breaking the unified card visual. The correct fix is to add the stacking context to the nav's content sections (leftSection, centerContent, rightSection, endContent) so they sit above the backdrop (z-index 99) while the backdrop still positions relative to the outer wrapper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #377 added
position: relative+zIndex: 100to the<nav>element to fix the mega menu backdrop covering nav items. This was incorrect — it made the<nav>the positioned ancestor for the backdrop, changing the backdrop's coverage area and breaking the unified card visual.Fix
Moved the stacking context from the
<nav>element to its content sections (leftSection,centerContent,rightSection,endContent). This way:Test Plan
position: relative(not the nav element)