Skip to content

Commit

Permalink
Merge pull request #10048 from DestinyItemManager/notification-zindex
Browse files Browse the repository at this point in the history
Adjust notifications z-index above tempContainer
  • Loading branch information
bhollis authored Nov 6, 2023
2 parents 04927cb + 0841bf2 commit 7f8ae24
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/app/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ $search-bar-height: 28px;
$emblem-width: 237px;
$emblem-height: 48px;

// The z-index for our "temp container" where all temporary items get placed.
$tempContainerZindex: 1000;

// A mixin that allows targeting styles only when in phone-portrait display mode
@mixin phone-portrait {
// This seems like a good breakpoint for portrait based on https://material.io/devices/
Expand Down
2 changes: 1 addition & 1 deletion src/app/notifications/NotificationsContainer.m.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@include below-header;
right: 0;
z-index: 1000;
z-index: $tempContainerZindex + 1;
padding: 8px;
box-sizing: border-box;
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/app/shell/Header.m.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $header-height: 44px;
position: fixed;
// Above the tempContainer. This is pretty much entirely so the search
// autocomplete menu displays above the search results sheet on mobile.
z-index: 1001;
z-index: $tempContainerZindex + 2;
top: 0;
left: 0;
right: 0;
Expand Down
4 changes: 3 additions & 1 deletion src/app/utils/temp-container.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use '../variables.scss' as *;

#temp-container {
// Position this at the very top of the screen. Most things won't care
// (they're absolutely positioned themselves, but @textcomplete doesn't know
Expand All @@ -7,5 +9,5 @@
top: 0;
width: 100%;
// Make sure things in the temp container display above others
z-index: 1000;
z-index: $tempContainerZindex;
}

0 comments on commit 7f8ae24

Please sign in to comment.