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.

420 lines
6.2 KiB

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