Add variable for z-index

This commit is contained in:
2023-09-08 15:40:22 +07:00
parent 6a56a8db6f
commit f1e7d66bbf
6 changed files with 12 additions and 7 deletions
@@ -28,3 +28,9 @@ $fs-md: 16px;
$fs-lg: 17px; $fs-lg: 17px;
$fs-x-lg: 20px; $fs-x-lg: 20px;
$fs-2x-lg: 32px; $fs-2x-lg: 32px;
// Z-index
$zindex-lv-1: 1;
$zindex-lv-2: 2;
$zindex-lv-3: 3;
$zindex-lv-4: 4;
@@ -1,11 +1,10 @@
// TODO
.overlay { .overlay {
@extend %d-absolute; @extend %d-absolute;
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: rgba(0, 0, 0, 0.3); background-color: rgba(0, 0, 0, 0.3);
z-index: 2; z-index: $zindex-lv-1;
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
@@ -18,5 +17,5 @@
@extend .overlay; @extend .overlay;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
z-index: 3; z-index: $zindex-lv-3;
} }
@@ -5,7 +5,7 @@
top: 32%; top: 32%;
transform: translate(-50%, -50%) scale(1); transform: translate(-50%, -50%) scale(1);
background-color: $white; background-color: $white;
z-index: 2; z-index: $zindex-lv-2;
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
@@ -8,7 +8,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: #00000066; background: #00000066;
z-index: 1; z-index: $zindex-lv-1;
transition: transition:
opacity 0.75s, opacity 0.75s,
visibility 0.75s; visibility 0.75s;
@@ -7,7 +7,7 @@
top: 50%; top: 50%;
transform: translate(-50%, -50%) scale(1); transform: translate(-50%, -50%) scale(1);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
z-index: 2; z-index: $zindex-lv-2;
padding: 40px 50px; padding: 40px 50px;
border-radius: 10px; border-radius: 10px;
background-color: $white; background-color: $white;
@@ -643,5 +643,5 @@
} }
#categoryForm { #categoryForm {
z-index: 4; z-index: $zindex-lv-4;
} }