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.

867 lines
14 KiB

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