Smooth animations for messages

pull/12/head
cagataycivici 2019-02-08 16:58:37 +03:00
parent b533785c4c
commit 65bf317eb0
2 changed files with 10 additions and 8 deletions

View File

@ -34,22 +34,25 @@
opacity: 0;
}
.p-messages.p-messages-leave-to {
max-height: 0;
opacity: 0;
.p-messages-enter-active {
-webkit-transition: opacity .3s;
transition: opacity .3s;
}
.p-messages.p-messages-leave {
max-height: 1000px;
}
.p-messages-enter-active {
transition: opacity 1s;
.p-messages.p-messages-leave-to {
max-height: 0;
opacity: 0;
margin: 0 !important;
}
.p-messages-leave-active {
overflow: hidden;
transition: max-height .45s cubic-bezier(0, 1, 0, 1), opacity .3s, margin .45s;
-webkit-transition: max-height .3s cubic-bezier(0, 1, 0, 1), opacity .3s, margin .3s;
transition: max-height .3 cubic-bezier(0, 1, 0, 1), opacity .3s, margin .3s;
}
.p-messages-leave-active .p-messages-close {

View File

@ -25,7 +25,6 @@
.p-toast-item-container {
position: relative;
margin-bottom: 1em;
}
.p-toast-item {
@ -83,7 +82,7 @@
max-height: 1000px;
}
.p-toast-message-leave-to {
.p-toast .p-toast-item-container.p-toast-message-leave-to {
max-height: 0;
opacity: 0;
margin-bottom: 0;