Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_Fabric.Animations.scss 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information.
  2. //
  3. // Office UI Fabric
  4. // --------------------------------------------------
  5. // Fabric Animations
  6. // Note that all animation classes should begin with the "ms-u" utility prefix.
  7. // The original class names are deprecated and will be removed in a future release.
  8. // Variables
  9. $ms-ease1: cubic-bezier(0.1,0.9,0.2,1);
  10. $ms-ease2: cubic-bezier(0.1,0.25,0.75,0.9);
  11. $ms-duration1: 0.167s;
  12. $ms-duration2: 0.267s;
  13. $ms-duration3: 0.367s;
  14. $ms-duration4: 0.467s;
  15. // Animation mixin
  16. @mixin animationMix($ms-name, $ms-duration, $ms-ease: $ms-ease1, $ms-fillMode: both) {
  17. @include animationName($ms-name);
  18. @include animationDuration($ms-duration);
  19. @include animationTiming($ms-ease);
  20. @include animationFillMode($ms-fillMode);
  21. }
  22. // slideRightIn40
  23. @mixin ms-u-slideRightIn40 {
  24. @include animationMix((fadeIn, slideRightIn40), $ms-duration3, $ms-ease1);
  25. }
  26. // slideLeftIn40
  27. @mixin ms-u-slideLeftIn40 {
  28. @include animationMix((fadeIn, slideLeftIn40), $ms-duration3, $ms-ease1);
  29. }
  30. // slideRightIn400
  31. @mixin ms-u-slideRightIn400 {
  32. @include animationMix((fadeIn, slideRightIn400), $ms-duration3, $ms-ease1);
  33. }
  34. // slideLeftIn400
  35. @mixin ms-u-slideLeftIn400 {
  36. @include animationMix((fadeIn, slideLeft400), $ms-duration3, $ms-ease1);
  37. }
  38. // slideUpIn20
  39. @mixin ms-u-slideUpIn20 {
  40. @include animationMix((fadeIn, slideUpIn20), $ms-duration3, $ms-ease1);
  41. }
  42. // slideUpIn10
  43. @mixin ms-u-slideUpIn10 {
  44. @include animationMix((fadeIn, slideUpIn10), $ms-duration1, $ms-ease2);
  45. }
  46. // slideDownIn20
  47. @mixin ms-u-slideDownIn20 {
  48. @include animationMix((fadeIn, slideDownIn20), $ms-duration3, $ms-ease1);
  49. }
  50. // slideDownIn10
  51. @mixin ms-u-slideDownIn10 {
  52. @include animationMix((fadeIn, slideDownIn10), $ms-duration1, $ms-ease2);
  53. }
  54. // slideRightOut40
  55. @mixin ms-u-slideRightOut40 {
  56. @include animationMix((fadeOut, slideRightOut40), $ms-duration1, $ms-ease2);
  57. }
  58. // slideLeftOut40
  59. @mixin ms-u-slideLeftOut40 {
  60. @include animationMix((fadeOut, slideLeftOut40), $ms-duration1, $ms-ease2);
  61. }
  62. // slideRightOut400
  63. @mixin ms-u-slideRightOut400 {
  64. @include animationMix((fadeOut, slideRightOut400), $ms-duration1, $ms-ease2);
  65. }
  66. // slideLeftOut400
  67. @mixin ms-u-slideLeftOut400 {
  68. @include animationMix((fadeOut, slideLeftOut400), $ms-duration1, $ms-ease2);
  69. }
  70. // slideUpOut20
  71. @mixin ms-u-slideUpOut20 {
  72. @include animationMix((fadeOut, slideUpOut20), $ms-duration1, $ms-ease2);
  73. }
  74. // slideUpOut10
  75. @mixin ms-u-slideUpOut10 {
  76. @include animationMix((fadeOut, slideUpOut10), $ms-duration1, $ms-ease2);
  77. }
  78. // slideDownOut20
  79. @mixin ms-u-slideDownOut20 {
  80. @include animationMix((fadeOut, slideDownOut20), $ms-duration1, $ms-ease2);
  81. }
  82. // slideDownOut10
  83. @mixin ms-u-slideDownOut10 {
  84. @include animationMix((fadeOut, slideDownOut10), $ms-duration1, $ms-ease2);
  85. }
  86. // scaleUpIn100
  87. @mixin ms-u-scaleUpIn100 {
  88. @include animationMix((fadeIn, scaleUp100), $ms-duration3, $ms-ease1);
  89. }
  90. // scaleDownIn100
  91. @mixin ms-u-scaleDownIn100 {
  92. @include animationMix((fadeIn, scaleDown100), $ms-duration3, $ms-ease1);
  93. }
  94. // scaleUpOut103
  95. @mixin ms-u-scaleUpOut103 {
  96. @include animationMix((fadeOut, scaleUp103), $ms-duration1, $ms-ease2);
  97. }
  98. // scaleDownOut98
  99. @mixin ms-u-scaleDownOut98 {
  100. @include animationMix((fadeOut, scaleDown98), $ms-duration1, $ms-ease2);
  101. }
  102. // fadeIn
  103. @mixin ms-u-fadeIn400 {
  104. -webkit-animation-duration: $ms-duration3;
  105. -webkit-animation-name: fadeIn;
  106. -webkit-animation-fill-mode: both;
  107. animation-duration: $ms-duration3;
  108. animation-name: fadeIn;
  109. animation-fill-mode: both;
  110. }
  111. @mixin ms-u-fadeIn100 {
  112. @include ms-u-fadeIn400;
  113. -webkit-animation-duration: $ms-duration1;
  114. animation-duration: $ms-duration1;
  115. }
  116. @mixin ms-u-fadeIn200 {
  117. @include ms-u-fadeIn400;
  118. -webkit-animation-duration: $ms-duration2;
  119. animation-duration: $ms-duration2;
  120. }
  121. @mixin ms-u-fadeIn500 {
  122. @include ms-u-fadeIn400;
  123. -webkit-animation-duration: $ms-duration4;
  124. animation-duration: $ms-duration4;
  125. }
  126. // fadeOut
  127. @mixin ms-u-fadeOut400 {
  128. -webkit-animation-duration: $ms-duration3;
  129. -webkit-animation-name: fadeOut;
  130. -webkit-animation-fill-mode: both;
  131. animation-duration: $ms-duration3;
  132. animation-name: fadeOut;
  133. animation-fill-mode: both;
  134. }
  135. @mixin ms-u-fadeOut100 {
  136. @include ms-u-fadeOut400;
  137. -webkit-animation-duration: 0.1s;
  138. animation-duration: 0.1s;
  139. }
  140. @mixin ms-u-fadeOut200 {
  141. @include ms-u-fadeOut400;
  142. -webkit-animation-duration: $ms-duration1;
  143. animation-duration: $ms-duration1;
  144. }
  145. @mixin ms-u-fadeOut500 {
  146. @include ms-u-fadeOut400;
  147. -webkit-animation-duration: $ms-duration4;
  148. animation-duration: $ms-duration4;
  149. }
  150. // rotate90deg
  151. @mixin ms-u-rotate90deg {
  152. @include animationMix(rotate90, 0.1s, $ms-ease2);
  153. }
  154. // rotateN90deg
  155. @mixin ms-u-rotateN90deg {
  156. @include animationMix(rotateN90, 0.1s, $ms-ease2);
  157. }
  158. // expandCollapse400
  159. @mixin ms-u-expandCollapse400 {
  160. -webkit-transition: height $ms-duration3 $ms-ease2;
  161. transition: height $ms-duration3 $ms-ease2;
  162. }
  163. // expandCollapse200
  164. @mixin ms-u-expandCollapse200 {
  165. -webkit-transition: height $ms-duration1 $ms-ease2;
  166. transition: height $ms-duration1 $ms-ease2;
  167. }
  168. // expandCollapse100
  169. @mixin ms-u-expandCollapse100 {
  170. -webkit-transition: height 0.1s $ms-ease2;
  171. transition: height 0.1s $ms-ease2;
  172. }
  173. // delay100
  174. @mixin ms-u-delay100 {
  175. -webkit-animation-delay: $ms-duration1;
  176. animation-delay: $ms-duration1;
  177. }
  178. // delay200
  179. @mixin ms-u-delay200 {
  180. -webkit-animation-delay: 0.267s;
  181. animation-delay: 0.267s;
  182. }