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.

445 lines
6.8 KiB

  1. /*******************************
  2. Animations
  3. *******************************/
  4. /*--------------
  5. Emphasis
  6. ---------------*/
  7. .ui.flash.transition {
  8. animation-name: flash;
  9. }
  10. .ui.shake.transition {
  11. animation-name: shake;
  12. }
  13. .ui.bounce.transition {
  14. animation-name: bounce;
  15. }
  16. .ui.tada.transition {
  17. animation-name: tada;
  18. }
  19. /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
  20. .ui.pulse.transition {
  21. animation-name: pulse;
  22. }
  23. /* Flash */
  24. @keyframes flash {
  25. 0%, 50%, 100% {
  26. opacity: 1;
  27. }
  28. 25%, 75% {
  29. opacity: 0;
  30. }
  31. }
  32. /* Shake */
  33. @keyframes shake {
  34. 0%, 100% {
  35. transform: translateX(0);
  36. }
  37. 10%, 30%, 50%, 70%, 90% {
  38. transform: translateX(-10px);
  39. }
  40. 20%, 40%, 60%, 80% {
  41. transform: translateX(10px);
  42. }
  43. }
  44. /* Bounce */
  45. @keyframes bounce {
  46. 0%, 20%, 50%, 80%, 100% {
  47. transform: translateY(0);
  48. }
  49. 40% {
  50. transform: translateY(-30px);
  51. }
  52. 60% {
  53. transform: translateY(-15px);
  54. }
  55. }
  56. /* Tada */
  57. @keyframes tada {
  58. 0% {
  59. transform: scale(1);
  60. }
  61. 10%, 20% {
  62. transform: scale(0.9) rotate(-3deg);
  63. }
  64. 30%, 50%, 70%, 90% {
  65. transform: scale(1.1) rotate(3deg);
  66. }
  67. 40%, 60%, 80% {
  68. transform: scale(1.1) rotate(-3deg);
  69. }
  70. 100% {
  71. transform: scale(1) rotate(0);
  72. }
  73. }
  74. /* Pulse */
  75. @keyframes pulse {
  76. 0% {
  77. transform: scale(1);
  78. opacity: 1;
  79. }
  80. 50% {
  81. transform: scale(0.9);
  82. opacity: 0.7;
  83. }
  84. 100% {
  85. transform: scale(1);
  86. opacity: 1;
  87. }
  88. }
  89. /*--------------
  90. Slide
  91. ---------------*/
  92. .ui.slide.down.transition.in {
  93. animation-name: slide;
  94. transform-origin: 50% 0%;
  95. -ms-transform-origin: 50% 0%;
  96. -webkit-transform-origin: 50% 0%;
  97. }
  98. .ui.slide.down.transition.out {
  99. animation-name: slideOut;
  100. transform-origin: 50% 0%;
  101. }
  102. .ui.slide.up.transition.in {
  103. animation-name: slide;
  104. transform-origin: 50% 100%;
  105. }
  106. .ui.slide.up.transition.out {
  107. animation-name: slideOut;
  108. transform-origin: 50% 100%;
  109. }
  110. @keyframes slide {
  111. 0% {
  112. opacity: 0;
  113. transform: scaleY(0);
  114. }
  115. 100% {
  116. opacity: 1;
  117. transform: scaleY(1);
  118. }
  119. }
  120. @keyframes slideOut {
  121. 0% {
  122. opacity: 1;
  123. transform: scaleY(1);
  124. }
  125. 100% {
  126. opacity: 0;
  127. transform: scaleY(0);
  128. }
  129. }
  130. /*--------------
  131. Flips
  132. ---------------*/
  133. .ui.flip.transition.in,
  134. .ui.flip.transition.out {
  135. perspective: 2000px;
  136. }
  137. .ui.horizontal.flip.transition.in,
  138. .ui.horizontal.flip.transition.out {
  139. animation-name: horizontalFlip;
  140. }
  141. .ui.horizontal.flip.transition.out {
  142. animation-name: horizontalFlipOut;
  143. }
  144. .ui.vertical.flip.transition.in,
  145. .ui.vertical.flip.transition.out {
  146. animation-name: verticalFlip;
  147. }
  148. .ui.vertical.flip.transition.out {
  149. animation-name: verticalFlipOut;
  150. }
  151. /* Horizontal */
  152. @keyframes horizontalFlip {
  153. 0% {
  154. transform: rotateY(-90deg);
  155. opacity: 0;
  156. }
  157. 100% {
  158. transform: rotateY(0deg);
  159. opacity: 1;
  160. }
  161. }
  162. /* Horizontal */
  163. @keyframes horizontalFlipOut {
  164. 0% {
  165. transform: rotateY(0deg);
  166. opacity: 1;
  167. }
  168. 100% {
  169. transform: rotateY(90deg);
  170. opacity: 0;
  171. }
  172. }
  173. /* Vertical */
  174. @keyframes verticalFlip {
  175. 0% {
  176. transform: rotateX(-90deg);
  177. opacity: 0;
  178. }
  179. 100% {
  180. transform: rotateX(0deg);
  181. opacity: 1;
  182. }
  183. }
  184. @keyframes verticalFlipOut {
  185. 0% {
  186. transform: rotateX(0deg);
  187. opacity: 1;
  188. }
  189. 100% {
  190. transform: rotateX(-90deg);
  191. opacity: 0;
  192. }
  193. }
  194. /*--------------
  195. Fades
  196. ---------------*/
  197. .ui.fade.transition.in {
  198. animation-name: fade;
  199. }
  200. .ui.fade.transition.out {
  201. animation-name: fadeOut;
  202. }
  203. .ui.fade.up.transition.in {
  204. animation-name: fadeUp;
  205. }
  206. .ui.fade.up.transition.out {
  207. animation-name: fadeUpOut;
  208. }
  209. .ui.fade.down.transition.in {
  210. animation-name: fadeDown;
  211. }
  212. .ui.fade.down.transition.out {
  213. animation-name: fadeDownOut;
  214. }
  215. /* Fade */
  216. @keyframes fade {
  217. 0% {
  218. opacity: 0;
  219. }
  220. 100% {
  221. opacity: 1;
  222. }
  223. }
  224. @keyframes fadeOut {
  225. 0% {
  226. opacity: 1;
  227. }
  228. 100% {
  229. opacity: 0;
  230. }
  231. }
  232. /* Fade Up */
  233. @keyframes fadeUp {
  234. 0% {
  235. opacity: 0;
  236. transform: translateY(20px);
  237. }
  238. 100% {
  239. opacity: 1;
  240. transform: translateY(0);
  241. }
  242. }
  243. @keyframes fadeUpOut {
  244. 0% {
  245. opacity: 1;
  246. transform: translateY(0);
  247. }
  248. 100% {
  249. opacity: 0;
  250. transform: translateY(20px);
  251. }
  252. }
  253. /* Fade Down */
  254. @keyframes fadeDown {
  255. 0% {
  256. opacity: 0;
  257. transform: translateY(-20px);
  258. }
  259. 100% {
  260. opacity: 1;
  261. transform: translateY(0);
  262. }
  263. }
  264. @keyframes fadeDownOut {
  265. 0% {
  266. opacity: 1;
  267. transform: translateY(0);
  268. }
  269. 100% {
  270. opacity: 0;
  271. transform: translateY(-20px);
  272. }
  273. }
  274. /*--------------
  275. Scale
  276. ---------------*/
  277. .ui.scale.transition.in {
  278. animation-name: scale;
  279. }
  280. .ui.scale.transition.out {
  281. animation-name: scaleOut;
  282. }
  283. /* Scale */
  284. @keyframes scale {
  285. 0% {
  286. opacity: 0;
  287. transform: scale(0.7);
  288. }
  289. 100% {
  290. opacity: 1;
  291. transform: scale(1);
  292. }
  293. }
  294. @keyframes scaleOut {
  295. 0% {
  296. opacity: 1;
  297. transform: scale(1);
  298. }
  299. 100% {
  300. opacity: 0;
  301. transform: scale(0.7);
  302. }
  303. }
  304. /*--------------
  305. Drop
  306. ---------------*/
  307. .ui.drop.transition {
  308. transform-origin: top center;
  309. animation-timing-function: cubic-bezier(0.34, 1.61, 0.7, 1);
  310. }
  311. .ui.drop.transition.in {
  312. animation-name: dropIn;
  313. }
  314. .ui.drop.transition.out {
  315. animation-name: dropOut;
  316. }
  317. /* Scale */
  318. @keyframes dropIn {
  319. 0% {
  320. opacity: 0;
  321. transform: scale(0);
  322. }
  323. 100% {
  324. opacity: 1;
  325. transform: scale(1);
  326. }
  327. }
  328. @keyframes dropOut {
  329. 0% {
  330. opacity: 1;
  331. transform: scale(1);
  332. }
  333. 100% {
  334. opacity: 0;
  335. transform: scale(0);
  336. }
  337. }
  338. /*--------------
  339. Browse
  340. ---------------*/
  341. .ui.browse.transition.in {
  342. animation-name: browseIn;
  343. animation-timing-function: ease;
  344. }
  345. .ui.browse.transition.out.left {
  346. animation-name: browseOutLeft;
  347. animation-timing-function: ease;
  348. }
  349. .ui.browse.transition.out.right {
  350. animation-name: browseOutRight;
  351. animation-timing-function: ease;
  352. }
  353. @keyframes browseIn {
  354. 0% {
  355. transform: scale(0.8) translateZ(0px);
  356. z-index: -1;
  357. }
  358. 10% {
  359. transform: scale(0.8) translateZ(0px);
  360. z-index: -1;
  361. opacity: 0.7;
  362. }
  363. 80% {
  364. transform: scale(1.05) translateZ(0px);
  365. opacity: 1;
  366. z-index: 999;
  367. }
  368. 100% {
  369. transform: scale(1) translateZ(0px);
  370. z-index: 999;
  371. }
  372. }
  373. @keyframes browseOutLeft {
  374. 0% {
  375. z-index: 999;
  376. transform: translateX(0%) rotateY(0deg) rotateX(0deg);
  377. }
  378. 50% {
  379. z-index: 1;
  380. transform: translateX(-105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
  381. }
  382. 80% {
  383. opacity: 1;
  384. }
  385. 100% {
  386. z-index: 1;
  387. transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
  388. opacity: 0;
  389. }
  390. }
  391. @keyframes browseOutRight {
  392. 0% {
  393. z-index: 999;
  394. transform: translateX(0%) rotateY(0deg) rotateX(0deg);
  395. }
  396. 50% {
  397. z-index: 1;
  398. transform: translateX(105%) rotateY(35deg) rotateX(10deg) translateZ(-10px);
  399. }
  400. 80% {
  401. opacity: 1;
  402. }
  403. 100% {
  404. z-index: 1;
  405. transform: translateX(0%) rotateY(0deg) rotateX(0deg) translateZ(-10px);
  406. opacity: 0;
  407. }
  408. }