gitea源码

animations.css 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. @keyframes isloadingspin {
  2. 0% { transform: translate(-50%, -50%) rotate(0deg); }
  3. 100% { transform: translate(-50%, -50%) rotate(360deg); }
  4. }
  5. .is-loading {
  6. pointer-events: none !important;
  7. position: relative !important;
  8. }
  9. .is-loading > * {
  10. opacity: 0.3;
  11. }
  12. .btn.is-loading > *,
  13. .button.is-loading > * {
  14. opacity: 0;
  15. }
  16. .is-loading::after {
  17. content: "";
  18. position: absolute;
  19. display: block;
  20. left: 50%;
  21. top: 50%;
  22. height: min(4em, 66.6%);
  23. width: fit-content; /* compat: safari - https://bugs.webkit.org/show_bug.cgi?id=267625 */
  24. aspect-ratio: 1;
  25. transform: translate(-50%, -50%);
  26. animation: isloadingspin 1000ms infinite linear;
  27. border-width: 4px;
  28. border-style: solid;
  29. border-color: var(--color-secondary) var(--color-secondary) var(--color-secondary-dark-8) var(--color-secondary-dark-8);
  30. border-radius: var(--border-radius-full);
  31. }
  32. .is-loading.loading-icon-2px::after {
  33. border-width: 2px;
  34. }
  35. .is-loading.loading-icon-3px::after {
  36. border-width: 3px;
  37. }
  38. /* for single form button, the loading state should be on the button, but not go semi-transparent, just replace the text on the button with the loader. */
  39. form.single-button-form.is-loading > * {
  40. opacity: 1;
  41. }
  42. form.single-button-form.is-loading .button {
  43. color: transparent;
  44. }
  45. .markup pre.is-loading,
  46. .editor-loading.is-loading {
  47. height: var(--height-loading);
  48. }
  49. .markup .is-loading > * {
  50. visibility: hidden;
  51. }
  52. .markup .is-loading {
  53. color: transparent;
  54. background: transparent;
  55. }
  56. /* TODO: not needed, use "is-loading loading-icon-2px" instead */
  57. code.language-math.is-loading::after {
  58. padding: 0;
  59. border-width: 2px;
  60. width: 1.25rem;
  61. height: 1.25rem;
  62. }
  63. @keyframes fadein {
  64. 0% {
  65. opacity: 0;
  66. }
  67. 100% {
  68. opacity: 1;
  69. }
  70. }
  71. @keyframes fadeout {
  72. 0% {
  73. opacity: 1;
  74. }
  75. 100% {
  76. opacity: 0;
  77. }
  78. }
  79. /* 1p5 means 1-point-5. it can't use "pulse" here, otherwise the animation is not right (maybe due to some conflicts */
  80. @keyframes pulse-1p5 {
  81. 0% {
  82. transform: scale(1);
  83. }
  84. 50% {
  85. transform: scale(1.5);
  86. }
  87. 100% {
  88. transform: scale(1);
  89. }
  90. }
  91. /* pulse animation for scale(1.5) in 200ms */
  92. .pulse-1p5-200 {
  93. animation: pulse-1p5 200ms linear;
  94. }
  95. .ui.modal,
  96. .ui.dimmer.transition {
  97. animation-name: fadein;
  98. animation-duration: 100ms;
  99. animation-timing-function: ease-in-out;
  100. }
  101. /* FIXME: `octicon-sync` is counterclockwise, so this animation is also counterclockwise, it looks somewhat strange.
  102. Ideally in the future we should use a better image for clockwise animation. */
  103. .circular-spin {
  104. animation: circular-spin-keyframes 1s linear infinite;
  105. }
  106. @keyframes circular-spin-keyframes {
  107. 100% {
  108. transform: rotate(-360deg);
  109. }
  110. }