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.

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