ant-design/components/style/mixins/motion.less

35 lines
937 B
Plaintext
Raw Normal View History

@import '../themes/default';
.motion-common(@duration: @animation-duration-base) {
2016-10-07 18:18:23 +08:00
animation-duration: @duration;
2016-01-18 14:19:09 +08:00
animation-fill-mode: both;
}
.motion-common-leave(@duration: @animation-duration-base) {
2016-10-07 18:18:23 +08:00
animation-duration: @duration;
2015-06-15 21:18:08 +08:00
animation-fill-mode: both;
2015-06-09 15:21:44 +08:00
}
.make-motion(@className, @keyframeName, @duration: @animation-duration-base) {
2015-11-26 19:32:55 +08:00
.@{className}-enter,
.@{className}-appear {
2016-10-07 18:18:23 +08:00
.motion-common(@duration);
2015-06-25 10:39:43 +08:00
animation-play-state: paused;
}
.@{className}-leave {
2016-10-07 18:18:23 +08:00
.motion-common-leave(@duration);
2015-06-25 10:39:43 +08:00
animation-play-state: paused;
}
2015-11-26 19:32:55 +08:00
.@{className}-enter.@{className}-enter-active,
.@{className}-appear.@{className}-appear-active {
2015-06-25 10:39:43 +08:00
animation-name: ~"@{keyframeName}In";
animation-play-state: running;
pointer-events: none;
2015-06-25 10:39:43 +08:00
}
.@{className}-leave.@{className}-leave-active {
animation-name: ~"@{keyframeName}Out";
animation-play-state: running;
pointer-events: none;
2015-06-25 10:39:43 +08:00
}
2015-06-09 15:21:44 +08:00
}