Skip to content

Commit

Permalink
fix: fix modal, overlay z-indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
TomatoVan committed Mar 5, 2024
1 parent a588818 commit c56236a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/app/styles/variables/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
--sidebar-width-collapsed: 80px;

// z - Индексы
--modal-z-index: 10;
--modal-z-index: 1000;
--overlay-z-index: 100;

// Цвета
--overlay-color: rgba(0 0 0 / 60%);
Expand Down
10 changes: 1 addition & 9 deletions src/shared/ui/Modal/Modal.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,14 @@
align-items: center;
}

.overlay {
width: 100%;
height: 100%;
background: var(--overlay-color);
display: flex;
justify-content: center;
align-items: center;
}

.content {
padding: 20px;
border-radius: 12px;
background: var(--bg-color);
transition: 0.3s transform;
transform: scale(0.5);
max-width: 60%;
z-index: var(--modal-z-index);
}

.opened {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/ui/Overlay/Overlay.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
bottom: 0;
right: 0;
left: 0;
z-index: -1;
cursor: pointer;
z-index: var(--overlay-z-index);
}

0 comments on commit c56236a

Please sign in to comment.