fade-and-scale.less 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Fade & Slide
  2. //
  3. @fade-and-scale-duration: .3s;
  4. @fade-and-scale-timing-function: ease-in-out;
  5. .am-fade-and-scale {
  6. animation-duration: @fade-and-scale-duration;
  7. animation-timing-function: @fade-and-scale-timing-function;
  8. animation-fill-mode: backwards;
  9. &.ng-enter, &.am-fade-and-scale-add, &.ng-hide-remove, &.ng-move {
  10. animation-name: fadeAndScaleIn;
  11. }
  12. &.ng-leave, &.am-fade-and-scale-remove, &.ng-hide {
  13. animation-name: fadeAndScaleOut;
  14. }
  15. &.ng-enter {
  16. visibility: hidden;
  17. animation-name: fadeAndScaleIn;
  18. animation-play-state: paused;
  19. &.ng-enter-active {
  20. visibility: visible;
  21. animation-play-state: running;
  22. }
  23. }
  24. &.ng-leave {
  25. animation-name: fadeAndScaleOut;
  26. animation-play-state: paused;
  27. &.ng-leave-active {
  28. animation-play-state: running;
  29. }
  30. }
  31. }
  32. // Keyframes
  33. //
  34. @keyframes fadeAndScaleIn {
  35. from {
  36. opacity: 0;
  37. transform: scale(0.7);
  38. }
  39. to {
  40. opacity: 1;
  41. }
  42. }
  43. @keyframes fadeAndScaleOut {
  44. from {
  45. opacity: 1;
  46. }
  47. to {
  48. opacity: 0;
  49. transform: scale(0.7);
  50. }
  51. }