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.

838 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%, 50%, 100% {
  249. opacity: 1;
  250. }
  251. 25%, 75% {
  252. opacity: 0;
  253. }
  254. }
  255. @-moz-keyframes flash {
  256. 0%, 50%, 100% {
  257. opacity: 1;
  258. }
  259. 25%, 75% {
  260. opacity: 0;
  261. }
  262. }
  263. @-o-keyframes flash {
  264. 0%, 50%, 100% {
  265. opacity: 1;
  266. }
  267. 25%, 75% {
  268. opacity: 0;
  269. }
  270. }
  271. @keyframes flash {
  272. 0%, 50%, 100% {
  273. opacity: 1;
  274. }
  275. 25%, 75% {
  276. opacity: 0;
  277. }
  278. }
  279. /* Shake */
  280. @-webkit-keyframes shake {
  281. 0%, 100% {
  282. -webkit-transform: translateX(0);
  283. }
  284. 10%, 30%, 50%, 70%, 90% {
  285. -webkit-transform: translateX(-10px);
  286. }
  287. 20%, 40%, 60%, 80% {
  288. -webkit-transform: translateX(10px);
  289. }
  290. }
  291. @-moz-keyframes shake {
  292. 0%, 100% {
  293. -moz-transform: translateX(0);
  294. }
  295. 10%, 30%, 50%, 70%, 90% {
  296. -moz-transform: translateX(-10px);
  297. }
  298. 20%, 40%, 60%, 80% {
  299. -moz-transform: translateX(10px);
  300. }
  301. }
  302. @-o-keyframes shake {
  303. 0%, 100% {
  304. -o-transform: translateX(0);
  305. }
  306. 10%, 30%, 50%, 70%, 90% {
  307. -o-transform: translateX(-10px);
  308. }
  309. 20%, 40%, 60%, 80% {
  310. -o-transform: translateX(10px);
  311. }
  312. }
  313. @keyframes shake {
  314. 0%, 100% {
  315. transform: translateX(0);
  316. }
  317. 10%, 30%, 50%, 70%, 90% {
  318. transform: translateX(-10px);
  319. }
  320. 20%, 40%, 60%, 80% {
  321. transform: translateX(10px);
  322. }
  323. }
  324. /* Bounce */
  325. @-webkit-keyframes bounce {
  326. 0%, 20%, 50%, 80%, 100% {
  327. -webkit-transform: translateY(0);
  328. }
  329. 40% {
  330. -webkit-transform: translateY(-30px);
  331. }
  332. 60% {
  333. -webkit-transform: translateY(-15px);
  334. }
  335. }
  336. @-moz-keyframes bounce {
  337. 0%, 20%, 50%, 80%, 100% {
  338. -moz-transform: translateY(0);
  339. }
  340. 40% {
  341. -moz-transform: translateY(-30px);
  342. }
  343. 60% {
  344. -moz-transform: translateY(-15px);
  345. }
  346. }
  347. @-o-keyframes bounce {
  348. 0%, 20%, 50%, 80%, 100% {
  349. -o-transform: translateY(0);
  350. }
  351. 40% {
  352. -o-transform: translateY(-30px);
  353. }
  354. 60% {
  355. -o-transform: translateY(-15px);
  356. }
  357. }
  358. @keyframes bounce {
  359. 0%, 20%, 50%, 80%, 100% {
  360. transform: translateY(0);
  361. }
  362. 40% {
  363. transform: translateY(-30px);
  364. }
  365. 60% {
  366. transform: translateY(-15px);
  367. }
  368. }
  369. /* Tada */
  370. @-webkit-keyframes tada {
  371. 0% {
  372. -webkit-transform: scale(1);
  373. }
  374. 10%, 20% {
  375. -webkit-transform: scale(0.9) rotate(-3deg);
  376. }
  377. 30%, 50%, 70%, 90% {
  378. -webkit-transform: scale(1.1) rotate(3deg);
  379. }
  380. 40%, 60%, 80% {
  381. -webkit-transform: scale(1.1) rotate(-3deg);
  382. }
  383. 100% {
  384. -webkit-transform: scale(1) rotate(0);
  385. }
  386. }
  387. @-moz-keyframes tada {
  388. 0% {
  389. -moz-transform: scale(1);
  390. }
  391. 10%, 20% {
  392. -moz-transform: scale(0.9) rotate(-3deg);
  393. }
  394. 30%, 50%, 70%, 90% {
  395. -moz-transform: scale(1.1) rotate(3deg);
  396. }
  397. 40%, 60%, 80% {
  398. -moz-transform: scale(1.1) rotate(-3deg);
  399. }
  400. 100% {
  401. -moz-transform: scale(1) rotate(0);
  402. }
  403. }
  404. @-o-keyframes tada {
  405. 0% {
  406. -o-transform: scale(1);
  407. }
  408. 10%, 20% {
  409. -o-transform: scale(0.9) rotate(-3deg);
  410. }
  411. 30%, 50%, 70%, 90% {
  412. -o-transform: scale(1.1) rotate(3deg);
  413. }
  414. 40%, 60%, 80% {
  415. -o-transform: scale(1.1) rotate(-3deg);
  416. }
  417. 100% {
  418. -o-transform: scale(1) rotate(0);
  419. }
  420. }
  421. @keyframes tada {
  422. 0% {
  423. transform: scale(1);
  424. }
  425. 10%, 20% {
  426. transform: scale(0.9) rotate(-3deg);
  427. }
  428. 30%, 50%, 70%, 90% {
  429. transform: scale(1.1) rotate(3deg);
  430. }
  431. 40%, 60%, 80% {
  432. transform: scale(1.1) rotate(-3deg);
  433. }
  434. 100% {
  435. transform: scale(1) rotate(0);
  436. }
  437. }
  438. @-webkit-keyframes pulse {
  439. 0% {
  440. -webkit-transform: scale(1);
  441. opacity: 1;
  442. }
  443. 50% {
  444. -webkit-transform: scale(0.9);
  445. opacity: 0.7;
  446. }
  447. 100% {
  448. -webkit-transform: scale(1);
  449. opacity: 1;
  450. }
  451. }
  452. @-o-keyframes pulse {
  453. 0% {
  454. -o-transform: scale(1);
  455. opacity: 1;
  456. }
  457. 50% {
  458. -o-transform: scale(0.9);
  459. opacity: 0.7;
  460. }
  461. 100% {
  462. -o-transform: scale(1);
  463. opacity: 1;
  464. }
  465. }
  466. @-moz-keyframes pulse {
  467. 0% {
  468. -moz-transform: scale(1);
  469. opacity: 1;
  470. }
  471. 50% {
  472. -moz-transform: scale(0.9);
  473. opacity: 0.7;
  474. }
  475. 100% {
  476. -moz-transform: scale(1);
  477. opacity: 1;
  478. }
  479. }
  480. @keyframes pulse {
  481. 0% {
  482. transform: scale(1);
  483. opacity: 1;
  484. }
  485. 50% {
  486. transform: scale(0.9);
  487. opacity: 0.7;
  488. }
  489. 100% {
  490. transform: scale(1);
  491. opacity: 1;
  492. }
  493. }
  494. /*--------------
  495. Flips
  496. ---------------*/
  497. /* Horizontal */
  498. @-webkit-keyframes horizontalFlip {
  499. 0% {
  500. -webkit-transform: rotateY(-90deg);
  501. opacity: 0;
  502. }
  503. 100% {
  504. -webkit-transform: rotateY(0deg);
  505. opacity: 1;
  506. }
  507. }
  508. @-moz-keyframes horizontalFlip {
  509. 0% {
  510. -moz-transform: rotateY(-90deg);
  511. opacity: 0;
  512. }
  513. 100% {
  514. -moz-transform: rotateY(0deg);
  515. opacity: 1;
  516. }
  517. }
  518. @-o-keyframes horizontalFlip {
  519. 0% {
  520. -o-transform: rotateY(-90deg);
  521. opacity: 0;
  522. }
  523. 100% {
  524. -o-transform: rotateY(0deg);
  525. opacity: 1;
  526. }
  527. }
  528. @keyframes horizontalFlip {
  529. 0% {
  530. transform: rotateY(-90deg);
  531. opacity: 0;
  532. }
  533. 100% {
  534. transform: rotateY(0deg);
  535. opacity: 1;
  536. }
  537. }
  538. /* Horizontal */
  539. @-webkit-keyframes horizontalFlipOut {
  540. 0% {
  541. -webkit-transform: rotateY(0deg);
  542. opacity: 0;
  543. }
  544. 100% {
  545. -webkit-transform: rotateY(90deg);
  546. opacity: 1;
  547. }
  548. }
  549. @-moz-keyframes horizontalFlipOut {
  550. 0% {
  551. -moz-transform: rotateY(0deg);
  552. opacity: 0;
  553. }
  554. 100% {
  555. -moz-transform: rotateY(90deg);
  556. opacity: 1;
  557. }
  558. }
  559. @-o-keyframes horizontalFlipOut {
  560. 0% {
  561. -o-transform: rotateY(0deg);
  562. opacity: 0;
  563. }
  564. 100% {
  565. -o-transform: rotateY(90deg);
  566. opacity: 1;
  567. }
  568. }
  569. @keyframes horizontalFlipOut {
  570. 0% {
  571. transform: rotateY(0deg);
  572. opacity: 0;
  573. }
  574. 100% {
  575. transform: rotateY(90deg);
  576. opacity: 1;
  577. }
  578. }
  579. /* Vertical */
  580. @-webkit-keyframes verticalFlip {
  581. 0% {
  582. -webkit-transform: rotateX(-90deg);
  583. opacity: 0;
  584. }
  585. 100% {
  586. -webkit-transform: rotateX(0deg);
  587. opacity: 1;
  588. }
  589. }
  590. @-moz-keyframes verticalFlip {
  591. 0% {
  592. -moz-transform: rotateX(-90deg);
  593. opacity: 0;
  594. }
  595. 100% {
  596. -moz-transform: rotateX(0deg);
  597. opacity: 1;
  598. }
  599. }
  600. @-o-keyframes verticalFlip {
  601. 0% {
  602. -o-transform: rotateX(-90deg);
  603. opacity: 0;
  604. }
  605. 100% {
  606. -o-transform: rotateX(0deg);
  607. opacity: 1;
  608. }
  609. }
  610. @keyframes verticalFlip {
  611. 0% {
  612. transform: rotateX(-90deg);
  613. opacity: 0;
  614. }
  615. 100% {
  616. transform: rotateX(0deg);
  617. opacity: 1;
  618. }
  619. }
  620. /*--------------
  621. Fades
  622. ---------------*/
  623. /* Fade */
  624. @-webkit-keyframes fade {
  625. 0% {
  626. opacity: 0;
  627. }
  628. 100% {
  629. opacity: 1;
  630. }
  631. }
  632. @-moz-keyframes fade {
  633. 0% {
  634. opacity: 0;
  635. }
  636. 100% {
  637. opacity: 1;
  638. }
  639. }
  640. @-o-keyframes fade {
  641. 0% {
  642. opacity: 0;
  643. }
  644. 100% {
  645. opacity: 1;
  646. }
  647. }
  648. @keyframes fade {
  649. 0% {
  650. opacity: 0;
  651. }
  652. 100% {
  653. opacity: 1;
  654. }
  655. }
  656. /* Fade Up */
  657. @-webkit-keyframes fadeUp {
  658. 0% {
  659. opacity: 0;
  660. -webkit-transform: translateY(20px);
  661. }
  662. 100% {
  663. opacity: 1;
  664. -webkit-transform: translateY(0);
  665. }
  666. }
  667. @-moz-keyframes fadeUp {
  668. 0% {
  669. opacity: 0;
  670. -moz-transform: translateY(20px);
  671. }
  672. 100% {
  673. opacity: 1;
  674. -moz-transform: translateY(0);
  675. }
  676. }
  677. @-o-keyframes fadeUp {
  678. 0% {
  679. opacity: 0;
  680. -o-transform: translateY(20px);
  681. }
  682. 100% {
  683. opacity: 1;
  684. -o-transform: translateY(0);
  685. }
  686. }
  687. @keyframes fadeUp {
  688. 0% {
  689. opacity: 0;
  690. transform: translateY(20px);
  691. }
  692. 100% {
  693. opacity: 1;
  694. transform: translateY(0);
  695. }
  696. }
  697. /* Fade Down */
  698. @-webkit-keyframes fadeDown {
  699. 0% {
  700. opacity: 0;
  701. -webkit-transform: translateY(-20px);
  702. }
  703. 100% {
  704. opacity: 1;
  705. -webkit-transform: translateY(0);
  706. }
  707. }
  708. @-moz-keyframes fadeDown {
  709. 0% {
  710. opacity: 0;
  711. -moz-transform: translateY(-20px);
  712. }
  713. 100% {
  714. opacity: 1;
  715. -moz-transform: translateY(0);
  716. }
  717. }
  718. @-o-keyframes fadeDown {
  719. 0% {
  720. opacity: 0;
  721. -o-transform: translateY(-20px);
  722. }
  723. 100% {
  724. opacity: 1;
  725. -o-transform: translateY(0);
  726. }
  727. }
  728. @keyframes fadeDown {
  729. 0% {
  730. opacity: 0;
  731. transform: translateY(-20px);
  732. }
  733. 100% {
  734. opacity: 1;
  735. transform: translateY(0);
  736. }
  737. }
  738. /*--------------
  739. Scale
  740. ---------------*/
  741. /* Scale */
  742. @-webkit-keyframes scale {
  743. 0% {
  744. opacity: 0;
  745. -webkit-transform: scale(0.7);
  746. }
  747. 100% {
  748. opacity: 1;
  749. -webkit-transform: scale(1);
  750. }
  751. }
  752. @-moz-keyframes scale {
  753. 0% {
  754. opacity: 0;
  755. -moz-transform: scale(0.7);
  756. }
  757. 100% {
  758. opacity: 1;
  759. -moz-transform: scale(1);
  760. }
  761. }
  762. @-o-keyframes scale {
  763. 0% {
  764. opacity: 0;
  765. -o-transform: scale(0.7);
  766. }
  767. 100% {
  768. opacity: 1;
  769. -o-transform: scale(1);
  770. }
  771. }
  772. @keyframes scale {
  773. 0% {
  774. opacity: 0;
  775. transform: scale(0.7);
  776. }
  777. 100% {
  778. opacity: 1;
  779. transform: scale(1);
  780. }
  781. }