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.

423 lines
6.3 KiB

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