Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust notifications z-index above tempContainer #10048

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}