Add animation styles and transitions to drop down menu and backdrop
This commit is contained in:
parent
c0b1c950a6
commit
35d1da8579
@ -1,22 +1,18 @@
|
|||||||
@use "../globals/" as *;
|
@use "../globals/" as *;
|
||||||
@use "../util/" as *;
|
@use "../util/" as *;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.drop-down {
|
.drop-down {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
min-width: 80%;
|
min-width: 80%;
|
||||||
|
height: auto;
|
||||||
|
max-height: max-content;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 0;
|
opacity: 0;
|
||||||
max-height: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
opacity: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
z-index: $dropdown-zindex;
|
z-index: $dropdown-zindex;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@ -25,6 +21,35 @@
|
|||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.drop-down.fade-in {
|
||||||
|
animation: fade-in 0.3s ease-in-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drop-down.fade-out {
|
||||||
|
animation: fade-out 0.3s ease-in-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fade-in {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fade-out {
|
||||||
|
0% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@include breakpoint(sm) {
|
@include breakpoint(sm) {
|
||||||
.drop-down {
|
.drop-down {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -39,10 +64,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.backdrop {
|
.backdrop {
|
||||||
display: none;
|
|
||||||
opacity: 0;
|
|
||||||
z-index: $backdrop-zindex;
|
z-index: $backdrop-zindex;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
display: block;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user