Skip to content

Commit

Permalink
Fix z-index conflicts between normal elements, context menu, and di…
Browse files Browse the repository at this point in the history
…alog (#168)

* fix?

* better comment
  • Loading branch information
rohanshiva authored Jan 7, 2024
1 parent 4b1ecf5 commit e72af1c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions client/src/App.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.app {
display: flex;
flex-direction: column;
/* All elements are at z-index 0; unless overwritten */
z-index: 0;
}

.main-section {
Expand Down
4 changes: 4 additions & 0 deletions client/src/components/dialog/Dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
position: fixed;
inset: 0px;
backdrop-filter: blur(0.2rem);
/* Dialog needs to be the top most layer */
z-index: 999;
}

.dialog-header {
Expand All @@ -27,4 +29,6 @@ dialog {
position: absolute;
inset: 0px;
padding: 1rem 2rem;
/* Dialog needs to be the top most layer */
z-index: 999;
}
1 change: 0 additions & 1 deletion client/src/components/home/Home.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ input[type="submit"]:hover {
border-radius: 1rem;
height: 512px;
width: 100%;
z-index: -1;
display: flex;
justify-content: flex-end;
}
Expand Down
2 changes: 2 additions & 0 deletions client/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ video {
border-radius: 0.2rem;
background-color: var(--bg);
border: 0.1rem solid var(--border);
/* Context menu is a layer above all other elements, but below dialog (see Dialog's CSS classes) */
z-index: 1;
}

.context-menu-container {
Expand Down

0 comments on commit e72af1c

Please sign in to comment.