Skip to content

Instantly share code, notes, and snippets.

@thomasJang
Created December 24, 2018 09:49
Show Gist options
  • Select an option

  • Save thomasJang/0ae4e491077fb376973a0be8a59969ac to your computer and use it in GitHub Desktop.

Select an option

Save thomasJang/0ae4e491077fb376973a0be8a59969ac to your computer and use it in GitHub Desktop.
ant-modal-custom.less
.ant-modal {
top: 24px;
.effect() {
animation-duration: 0.3s;
animation-fill-mode: both;
}
&.slidedown-enter,
&.slidedown-appear {
opacity: 0;
.effect();
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
animation-play-state: paused;
}
&.slidedown-leave {
.effect();
animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
animation-play-state: paused;
}
&.slidedown-enter&.slidedown-enter-active,
&.slidedown-appear&.slidedown-appear-active {
animation-name: antModalSlideDown;
animation-play-state: running;
}
&.slidedown-leave&.slidedown-leave-active {
animation-name: antModalSlideUp;
animation-play-state: running;
}
@keyframes antModalSlideDown {
0% {
opacity: 0;
transform: translateY(-50%);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes antModalSlideUp {
0% {
transform: translateY(0);
}
100% {
opacity: 0;
transform: translateY(-50%);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment