Files
2018-04-10 14:51:39 +10:00

93 lines
1.8 KiB
SCSS

.component_modal{
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0,0,0,0.7);
box-shadow: 1px 2px 10px rgba(0,0,0,0.2);
z-index: 1000;
> div{
background: white;
width: 65%;
max-width: 300px;
padding: 40px 20px 0 20px;
border-radius: 2px;
}
}
.component_prompt, .component_alert{
> p{
font-size: 1.1em;
margin: 0 0 10px 0;
}
.modal-error-message{
color: var(--error);
}
.buttons{
display: flex;
[type="submit"]{
border-radius: 10px 0 0;
}
> button{
width: 50%;
margin-left: auto;
}
}
}
.component_prompt .buttons{
margin: 15px -20px;
> p{
text-align: center;
}
}
.component_alert .buttons{
margin: 25px -20px 15px -20px;
> p{
text-align: justify;
}
}
/***********************/
/* ENTERING TRANSITION */
// background
.modal-appear > div, .modal-enter > div{ opacity: 0;}
.modal-appear.modal-appear-active > div, .modal-enter.modal-enter-active > div{
opacity: 1;
transition: opacity 0.2s ease;
}
// box
.modal-appear > div > div, .modal-enter > div > div{
opacity: 0;
transform-origin: top center;
transform: translateY(10px);
}
.modal-appear.modal-appear-active > div > div, .modal-enter.modal-enter-active > div > div{
opacity: 1;
transform: translateY(0);
transition: all 0.2s ease-out;
transition-delay: 0.1s;
}
/***********************/
/* LEAVING TRANSITION */
// background
.modal-leave > div{ opacity: 1; }
.modal-leave.modal-leave-active > div{
opacity: 0;
transition: opacity 0.2s ease-out;
transition-delay: 0.1s;
}
// box
.modal-leave > div > div { opacity: 1; }
.modal-leave.modal-leave-active > div > div{
opacity: 0;
transition: all 0.3s ease;
}