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

31 lines
718 B
Plaintext
Raw Normal View History

2015-07-01 17:25:16 +08:00
.motion-common() {
2016-02-02 20:33:38 +08:00
animation-duration: .2s;
2016-01-18 14:19:09 +08:00
animation-fill-mode: both;
}
.motion-common-leave() {
animation-duration: .2s;
2015-06-15 21:18:08 +08:00
animation-fill-mode: both;
2015-06-09 15:21:44 +08:00
}
2015-07-01 17:25:16 +08:00
.make-motion(@className, @keyframeName) {
2015-11-26 19:32:55 +08:00
.@{className}-enter,
.@{className}-appear {
2015-07-01 17:25:16 +08:00
.motion-common();
2015-06-25 10:39:43 +08:00
animation-play-state: paused;
}
.@{className}-leave {
2016-01-18 14:19:09 +08:00
.motion-common-leave();
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;
}
.@{className}-leave.@{className}-leave-active {
animation-name: ~"@{keyframeName}Out";
animation-play-state: running;
}
2015-06-09 15:21:44 +08:00
}