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.

866 lines
15 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. -webkit-animation-iteration-count: 1;
  13. animation-iteration-count: 1;
  14. -webkit-animation-duration: 1s;
  15. animation-duration: 1s;
  16. -webkit-animation-timing-function: ease;
  17. animation-timing-function: ease;
  18. -webkit-animation-fill-mode: both;
  19. animation-fill-mode: both;
  20. }
  21. /*******************************
  22. States
  23. *******************************/
  24. .ui.animating.transition {
  25. display: block;
  26. -webkit-backface-visibility: hidden;
  27. -ms-backface-visibility: hidden;
  28. backface-visibility: hidden;
  29. -webkit-transform: translateZ(0);
  30. -ms-transform: translateZ(0);
  31. transform: translateZ(0);
  32. }
  33. /* Loading */
  34. .ui.loading.transition {
  35. position: absolute;
  36. top: -999999px;
  37. right: -99999px;
  38. }
  39. /* Hidden */
  40. .ui.hidden.transition {
  41. display: none;
  42. }
  43. /* Visible */
  44. .ui.visible.transition {
  45. display: block;
  46. visibility: visible;
  47. }
  48. /* Disabled */
  49. .ui.disabled.transition {
  50. -webkit-animation-play-state: paused;
  51. animation-play-state: paused;
  52. }
  53. /*******************************
  54. Variations
  55. *******************************/
  56. .ui.looping.transition {
  57. -webkit-animation-iteration-count: infinite;
  58. animation-iteration-count: infinite;
  59. }
  60. /*******************************
  61. Types
  62. *******************************/
  63. /*--------------
  64. Emphasis
  65. ---------------*/
  66. .ui.flash.transition {
  67. -webkit-animation-name: flash;
  68. animation-name: flash;
  69. }
  70. .ui.shake.transition {
  71. -webkit-animation-name: shake;
  72. animation-name: shake;
  73. }
  74. .ui.bounce.transition {
  75. -webkit-animation-name: bounce;
  76. animation-name: bounce;
  77. }
  78. .ui.tada.transition {
  79. -webkit-animation-name: tada;
  80. animation-name: tada;
  81. }
  82. /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
  83. .ui.pulse.transition {
  84. -webkit-animation-name: pulse;
  85. animation-name: pulse;
  86. }
  87. /*--------------
  88. Flips
  89. ---------------*/
  90. .ui.flip.transition.in,
  91. .ui.flip.transition.out {
  92. -webkit-perspective: 2000px;
  93. -ms-perspective: 2000px;
  94. perspective: 2000px;
  95. }
  96. .ui.horizontal.flip.transition.in,
  97. .ui.horizontal.flip.transition.out {
  98. -webkit-animation-name: horizontalFlip;
  99. animation-name: horizontalFlip;
  100. }
  101. .ui.horizontal.flip.transition.out {
  102. -webkit-animation-name: horizontalFlipOut;
  103. animation-name: horizontalFlipOut;
  104. }
  105. .ui.vertical.flip.transition.in,
  106. .ui.vertical.flip.transition.out {
  107. -webkit-animation-name: verticalFlip;
  108. animation-name: verticalFlip;
  109. }
  110. .ui.vertical.flip.transition.out {
  111. -webkit-animation-name: verticalFlipOut;
  112. animation-name: verticalFlipOut;
  113. }
  114. /*--------------
  115. Fades
  116. ---------------*/
  117. .ui.fade.transition.in {
  118. -webkit-animation-name: fade;
  119. animation-name: fade;
  120. }
  121. .ui.fade.transition.out {
  122. -webkit-animation-name: fadeOut;
  123. animation-name: fadeOut;
  124. }
  125. .ui.fade.up.transition.in {
  126. -webkit-animation-name: fadeUp;
  127. animation-name: fadeUp;
  128. }
  129. .ui.fade.up.transition.out {
  130. -webkit-animation-name: fadeUpOut;
  131. animation-name: fadeUpOut;
  132. }
  133. .ui.fade.down.transition.in {
  134. -webkit-animation-name: fadeDown;
  135. animation-name: fadeDown;
  136. }
  137. .ui.fade.down.transition.out {
  138. -webkit-animation-name: fadeDownOut;
  139. animation-name: fadeDownOut;
  140. }
  141. /*--------------
  142. Scale
  143. ---------------*/
  144. .ui.scale.transition.in {
  145. -webkit-animation-name: scale;
  146. animation-name: scale;
  147. }
  148. .ui.scale.transition.out {
  149. -webkit-animation-name: scaleOut;
  150. animation-name: scaleOut;
  151. }
  152. /*--------------
  153. Slide
  154. ---------------*/
  155. .ui.slide.down.transition.in {
  156. -webkit-animation-name: slide;
  157. animation-name: slide;
  158. transform-origin: 50% 0%;
  159. -ms-transform-origin: 50% 0%;
  160. -webkit-transform-origin: 50% 0%;
  161. }
  162. .ui.slide.down.transition.out {
  163. -webkit-animation-name: slideOut;
  164. animation-name: slideOut;
  165. -webkit-transform-origin: 50% 0%;
  166. -ms-transform-origin: 50% 0%;
  167. transform-origin: 50% 0%;
  168. }
  169. .ui.slide.up.transition.in {
  170. -webkit-animation-name: slide;
  171. animation-name: slide;
  172. -webkit-transform-origin: 50% 100%;
  173. -ms-transform-origin: 50% 100%;
  174. transform-origin: 50% 100%;
  175. }
  176. .ui.slide.up.transition.out {
  177. -webkit-animation-name: slideOut;
  178. animation-name: slideOut;
  179. -webkit-transform-origin: 50% 100%;
  180. -ms-transform-origin: 50% 100%;
  181. transform-origin: 50% 100%;
  182. }
  183. @-webkit-keyframes slide {
  184. 0% {
  185. opacity: 0;
  186. -webkit-transform: scaleY(0);
  187. transform: scaleY(0);
  188. }
  189. 100% {
  190. opacity: 1;
  191. -webkit-transform: scaleY(1);
  192. transform: scaleY(1);
  193. }
  194. }
  195. @keyframes slide {
  196. 0% {
  197. opacity: 0;
  198. -webkit-transform: scaleY(0);
  199. -ms-transform: scaleY(0);
  200. transform: scaleY(0);
  201. }
  202. 100% {
  203. opacity: 1;
  204. -webkit-transform: scaleY(1);
  205. -ms-transform: scaleY(1);
  206. transform: scaleY(1);
  207. }
  208. }
  209. @-webkit-keyframes slideOut {
  210. 0% {
  211. opacity: 1;
  212. -webkit-transform: scaleY(1);
  213. transform: scaleY(1);
  214. }
  215. 100% {
  216. opacity: 0;
  217. -webkit-transform: scaleY(0);
  218. transform: scaleY(0);
  219. }
  220. }
  221. @keyframes slideOut {
  222. 0% {
  223. opacity: 1;
  224. -webkit-transform: scaleY(1);
  225. -ms-transform: scaleY(1);
  226. transform: scaleY(1);
  227. }
  228. 100% {
  229. opacity: 0;
  230. -webkit-transform: scaleY(0);
  231. -ms-transform: scaleY(0);
  232. transform: scaleY(0);
  233. }
  234. }
  235. /*******************************
  236. Animations
  237. *******************************/
  238. /*--------------
  239. Emphasis
  240. ---------------*/
  241. /* Flash */
  242. @-webkit-keyframes flash {
  243. 0%, 50%, 100% {
  244. opacity: 1;
  245. }
  246. 25%, 75% {
  247. opacity: 0;
  248. }
  249. }
  250. @keyframes flash {
  251. 0%, 50%, 100% {
  252. opacity: 1;
  253. }
  254. 25%, 75% {
  255. opacity: 0;
  256. }
  257. }
  258. /* Shake */
  259. @-webkit-keyframes shake {
  260. 0%, 100% {
  261. -webkit-transform: translateX(0);
  262. transform: translateX(0);
  263. }
  264. 10%, 30%, 50%, 70%, 90% {
  265. -webkit-transform: translateX(-10px);
  266. transform: translateX(-10px);
  267. }
  268. 20%, 40%, 60%, 80% {
  269. -webkit-transform: translateX(10px);
  270. transform: translateX(10px);
  271. }
  272. }
  273. @keyframes shake {
  274. 0%, 100% {
  275. -webkit-transform: translateX(0);
  276. -ms-transform: translateX(0);
  277. transform: translateX(0);
  278. }
  279. 10%, 30%, 50%, 70%, 90% {
  280. -webkit-transform: translateX(-10px);
  281. -ms-transform: translateX(-10px);
  282. transform: translateX(-10px);
  283. }
  284. 20%, 40%, 60%, 80% {
  285. -webkit-transform: translateX(10px);
  286. -ms-transform: translateX(10px);
  287. transform: translateX(10px);
  288. }
  289. }
  290. /* Bounce */
  291. @-webkit-keyframes bounce {
  292. 0%, 20%, 50%, 80%, 100% {
  293. -webkit-transform: translateY(0);
  294. transform: translateY(0);
  295. }
  296. 40% {
  297. -webkit-transform: translateY(-30px);
  298. transform: translateY(-30px);
  299. }
  300. 60% {
  301. -webkit-transform: translateY(-15px);
  302. transform: translateY(-15px);
  303. }
  304. }
  305. @keyframes bounce {
  306. 0%, 20%, 50%, 80%, 100% {
  307. -webkit-transform: translateY(0);
  308. -ms-transform: translateY(0);
  309. transform: translateY(0);
  310. }
  311. 40% {
  312. -webkit-transform: translateY(-30px);
  313. -ms-transform: translateY(-30px);
  314. transform: translateY(-30px);
  315. }
  316. 60% {
  317. -webkit-transform: translateY(-15px);
  318. -ms-transform: translateY(-15px);
  319. transform: translateY(-15px);
  320. }
  321. }
  322. /* Tada */
  323. @-webkit-keyframes tada {
  324. 0% {
  325. -webkit-transform: scale(1);
  326. transform: scale(1);
  327. }
  328. 10%, 20% {
  329. -webkit-transform: scale(0.9) rotate(-3deg);
  330. transform: scale(0.9) rotate(-3deg);
  331. }
  332. 30%, 50%, 70%, 90% {
  333. -webkit-transform: scale(1.1) rotate(3deg);
  334. transform: scale(1.1) rotate(3deg);
  335. }
  336. 40%, 60%, 80% {
  337. -webkit-transform: scale(1.1) rotate(-3deg);
  338. transform: scale(1.1) rotate(-3deg);
  339. }
  340. 100% {
  341. -webkit-transform: scale(1) rotate(0);
  342. transform: scale(1) rotate(0);
  343. }
  344. }
  345. @keyframes tada {
  346. 0% {
  347. -webkit-transform: scale(1);
  348. -ms-transform: scale(1);
  349. transform: scale(1);
  350. }
  351. 10%, 20% {
  352. -webkit-transform: scale(0.9) rotate(-3deg);
  353. -ms-transform: scale(0.9) rotate(-3deg);
  354. transform: scale(0.9) rotate(-3deg);
  355. }
  356. 30%, 50%, 70%, 90% {
  357. -webkit-transform: scale(1.1) rotate(3deg);
  358. -ms-transform: scale(1.1) rotate(3deg);
  359. transform: scale(1.1) rotate(3deg);
  360. }
  361. 40%, 60%, 80% {
  362. -webkit-transform: scale(1.1) rotate(-3deg);
  363. -ms-transform: scale(1.1) rotate(-3deg);
  364. transform: scale(1.1) rotate(-3deg);
  365. }
  366. 100% {
  367. -webkit-transform: scale(1) rotate(0);
  368. -ms-transform: scale(1) rotate(0);
  369. transform: scale(1) rotate(0);
  370. }
  371. }
  372. /* Pulse */
  373. @-webkit-keyframes pulse {
  374. 0% {
  375. -webkit-transform: scale(1);
  376. transform: scale(1);
  377. opacity: 1;
  378. }
  379. 50% {
  380. -webkit-transform: scale(0.9);
  381. transform: scale(0.9);
  382. opacity: 0.7;
  383. }
  384. 100% {
  385. -webkit-transform: scale(1);
  386. transform: scale(1);
  387. opacity: 1;
  388. }
  389. }
  390. @keyframes pulse {
  391. 0% {
  392. -webkit-transform: scale(1);
  393. -ms-transform: scale(1);
  394. transform: scale(1);
  395. opacity: 1;
  396. }
  397. 50% {
  398. -webkit-transform: scale(0.9);
  399. -ms-transform: scale(0.9);
  400. transform: scale(0.9);
  401. opacity: 0.7;
  402. }
  403. 100% {
  404. -webkit-transform: scale(1);
  405. -ms-transform: scale(1);
  406. transform: scale(1);
  407. opacity: 1;
  408. }
  409. }
  410. /*--------------
  411. Flips
  412. ---------------*/
  413. /* Horizontal */
  414. @-webkit-keyframes horizontalFlip {
  415. 0% {
  416. -webkit-transform: rotateY(-90deg);
  417. transform: rotateY(-90deg);
  418. opacity: 0;
  419. }
  420. 100% {
  421. -webkit-transform: rotateY(0deg);
  422. transform: rotateY(0deg);
  423. opacity: 1;
  424. }
  425. }
  426. @keyframes horizontalFlip {
  427. 0% {
  428. -webkit-transform: rotateY(-90deg);
  429. -ms-transform: rotateY(-90deg);
  430. transform: rotateY(-90deg);
  431. opacity: 0;
  432. }
  433. 100% {
  434. -webkit-transform: rotateY(0deg);
  435. -ms-transform: rotateY(0deg);
  436. transform: rotateY(0deg);
  437. opacity: 1;
  438. }
  439. }
  440. /* Horizontal */
  441. @-webkit-keyframes horizontalFlipOut {
  442. 0% {
  443. -webkit-transform: rotateY(0deg);
  444. transform: rotateY(0deg);
  445. opacity: 1;
  446. }
  447. 100% {
  448. -webkit-transform: rotateY(90deg);
  449. transform: rotateY(90deg);
  450. opacity: 0;
  451. }
  452. }
  453. @keyframes horizontalFlipOut {
  454. 0% {
  455. -webkit-transform: rotateY(0deg);
  456. -ms-transform: rotateY(0deg);
  457. transform: rotateY(0deg);
  458. opacity: 1;
  459. }
  460. 100% {
  461. -webkit-transform: rotateY(90deg);
  462. -ms-transform: rotateY(90deg);
  463. transform: rotateY(90deg);
  464. opacity: 0;
  465. }
  466. }
  467. /* Vertical */
  468. @-webkit-keyframes verticalFlip {
  469. 0% {
  470. -webkit-transform: rotateX(-90deg);
  471. transform: rotateX(-90deg);
  472. opacity: 0;
  473. }
  474. 100% {
  475. -webkit-transform: rotateX(0deg);
  476. transform: rotateX(0deg);
  477. opacity: 1;
  478. }
  479. }
  480. @keyframes verticalFlip {
  481. 0% {
  482. -webkit-transform: rotateX(-90deg);
  483. -ms-transform: rotateX(-90deg);
  484. transform: rotateX(-90deg);
  485. opacity: 0;
  486. }
  487. 100% {
  488. -webkit-transform: rotateX(0deg);
  489. -ms-transform: rotateX(0deg);
  490. transform: rotateX(0deg);
  491. opacity: 1;
  492. }
  493. }
  494. @-webkit-keyframes verticalFlipOut {
  495. 0% {
  496. -webkit-transform: rotateX(0deg);
  497. transform: rotateX(0deg);
  498. opacity: 1;
  499. }
  500. 100% {
  501. -webkit-transform: rotateX(-90deg);
  502. transform: rotateX(-90deg);
  503. opacity: 0;
  504. }
  505. }
  506. @keyframes verticalFlipOut {
  507. 0% {
  508. -webkit-transform: rotateX(0deg);
  509. -ms-transform: rotateX(0deg);
  510. transform: rotateX(0deg);
  511. opacity: 1;
  512. }
  513. 100% {
  514. -webkit-transform: rotateX(-90deg);
  515. -ms-transform: rotateX(-90deg);
  516. transform: rotateX(-90deg);
  517. opacity: 0;
  518. }
  519. }
  520. /*--------------
  521. Fades
  522. ---------------*/
  523. /* Fade */
  524. @-webkit-keyframes fade {
  525. 0% {
  526. opacity: 0;
  527. }
  528. 100% {
  529. opacity: 1;
  530. }
  531. }
  532. @keyframes fade {
  533. 0% {
  534. opacity: 0;
  535. }
  536. 100% {
  537. opacity: 1;
  538. }
  539. }
  540. @-webkit-keyframes fadeOut {
  541. 0% {
  542. opacity: 1;
  543. }
  544. 100% {
  545. opacity: 0;
  546. }
  547. }
  548. @keyframes fadeOut {
  549. 0% {
  550. opacity: 1;
  551. }
  552. 100% {
  553. opacity: 0;
  554. }
  555. }
  556. /* Fade Up */
  557. @-webkit-keyframes fadeUp {
  558. 0% {
  559. opacity: 0;
  560. -webkit-transform: translateY(20px);
  561. transform: translateY(20px);
  562. }
  563. 100% {
  564. opacity: 1;
  565. -webkit-transform: translateY(0);
  566. transform: translateY(0);
  567. }
  568. }
  569. @keyframes fadeUp {
  570. 0% {
  571. opacity: 0;
  572. -webkit-transform: translateY(20px);
  573. -ms-transform: translateY(20px);
  574. transform: translateY(20px);
  575. }
  576. 100% {
  577. opacity: 1;
  578. -webkit-transform: translateY(0);
  579. -ms-transform: translateY(0);
  580. transform: translateY(0);
  581. }
  582. }
  583. @-webkit-keyframes fadeUpOut {
  584. 0% {
  585. opacity: 1;
  586. -webkit-transform: translateY(0);
  587. transform: translateY(0);
  588. }
  589. 100% {
  590. opacity: 0;
  591. -webkit-transform: translateY(20px);
  592. transform: translateY(20px);
  593. }
  594. }
  595. @keyframes fadeUpOut {
  596. 0% {
  597. opacity: 1;
  598. -webkit-transform: translateY(0);
  599. -ms-transform: translateY(0);
  600. transform: translateY(0);
  601. }
  602. 100% {
  603. opacity: 0;
  604. -webkit-transform: translateY(20px);
  605. -ms-transform: translateY(20px);
  606. transform: translateY(20px);
  607. }
  608. }
  609. /* Fade Down */
  610. @-webkit-keyframes fadeDown {
  611. 0% {
  612. opacity: 0;
  613. -webkit-transform: translateY(-20px);
  614. transform: translateY(-20px);
  615. }
  616. 100% {
  617. opacity: 1;
  618. -webkit-transform: translateY(0);
  619. transform: translateY(0);
  620. }
  621. }
  622. @keyframes fadeDown {
  623. 0% {
  624. opacity: 0;
  625. -webkit-transform: translateY(-20px);
  626. -ms-transform: translateY(-20px);
  627. transform: translateY(-20px);
  628. }
  629. 100% {
  630. opacity: 1;
  631. -webkit-transform: translateY(0);
  632. -ms-transform: translateY(0);
  633. transform: translateY(0);
  634. }
  635. }
  636. @-webkit-keyframes fadeDownOut {
  637. 0% {
  638. opacity: 1;
  639. -webkit-transform: translateY(0);
  640. transform: translateY(0);
  641. }
  642. 100% {
  643. opacity: 0;
  644. -webkit-transform: translateY(-20px);
  645. transform: translateY(-20px);
  646. }
  647. }
  648. @keyframes fadeDownOut {
  649. 0% {
  650. opacity: 1;
  651. -webkit-transform: translateY(0);
  652. -ms-transform: translateY(0);
  653. transform: translateY(0);
  654. }
  655. 100% {
  656. opacity: 0;
  657. -webkit-transform: translateY(-20px);
  658. -ms-transform: translateY(-20px);
  659. transform: translateY(-20px);
  660. }
  661. }
  662. /*--------------
  663. Scale
  664. ---------------*/
  665. /* Scale */
  666. @-webkit-keyframes scale {
  667. 0% {
  668. opacity: 0;
  669. -webkit-transform: scale(0.7);
  670. transform: scale(0.7);
  671. }
  672. 100% {
  673. opacity: 1;
  674. -webkit-transform: scale(1);
  675. transform: scale(1);
  676. }
  677. }
  678. @keyframes scale {
  679. 0% {
  680. opacity: 0;
  681. -webkit-transform: scale(0.7);
  682. -ms-transform: scale(0.7);
  683. transform: scale(0.7);
  684. }
  685. 100% {
  686. opacity: 1;
  687. -webkit-transform: scale(1);
  688. -ms-transform: scale(1);
  689. transform: scale(1);
  690. }
  691. }
  692. @-webkit-keyframes scaleOut {
  693. 0% {
  694. opacity: 1;
  695. -webkit-transform: scale(1);
  696. transform: scale(1);
  697. }
  698. 100% {
  699. opacity: 0;
  700. -webkit-transform: scale(0.7);
  701. transform: scale(0.7);
  702. }
  703. }
  704. @keyframes scaleOut {
  705. 0% {
  706. opacity: 1;
  707. -webkit-transform: scale(1);
  708. -ms-transform: scale(1);
  709. transform: scale(1);
  710. }
  711. 100% {
  712. opacity: 0;
  713. -webkit-transform: scale(0.7);
  714. -ms-transform: scale(0.7);
  715. transform: scale(0.7);
  716. }
  717. }