gitea源码

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /* styles are based on node_modules/tippy.js/dist/tippy.css */
  2. /* class to hide tippy target elements on page load */
  3. .tippy-target {
  4. display: none !important;
  5. }
  6. /* show target element once it's been moved by tippy.js */
  7. .tippy-content .tippy-target {
  8. display: unset !important;
  9. }
  10. [data-tippy-root] {
  11. max-width: calc(100vw - 32px);
  12. }
  13. .tippy-box {
  14. position: relative;
  15. background-color: var(--color-menu);
  16. color: var(--color-text);
  17. border: 1px solid var(--color-secondary);
  18. border-radius: var(--border-radius);
  19. font-size: 1rem;
  20. }
  21. .tippy-content {
  22. position: relative;
  23. z-index: 1;
  24. }
  25. .tippy-box[data-theme="default"] {
  26. box-shadow: 0 6px 18px var(--color-shadow);
  27. }
  28. /* bare theme, no styling at all, except box-shadow */
  29. .tippy-box[data-theme="bare"] {
  30. border: none;
  31. box-shadow: 0 6px 18px var(--color-shadow);
  32. }
  33. .tippy-box[data-theme="bare"] .tippy-content {
  34. padding: 0;
  35. background: transparent;
  36. }
  37. /* tooltip theme for text tooltips */
  38. .tippy-box[data-theme="tooltip"] {
  39. background-color: var(--color-tooltip-bg);
  40. color: var(--color-tooltip-text);
  41. border: none;
  42. }
  43. .tippy-box[data-theme="tooltip"] .tippy-content {
  44. padding: 0.5rem 1rem;
  45. }
  46. .tippy-box[data-theme="tooltip"] .tippy-svg-arrow-inner,
  47. .tippy-box[data-theme="tooltip"] .tippy-svg-arrow-outer {
  48. fill: var(--color-tooltip-bg);
  49. }
  50. /* menu theme for .ui.menu */
  51. .tippy-box[data-theme="menu"] {
  52. background-color: var(--color-menu);
  53. color: var(--color-text);
  54. box-shadow: 0 6px 18px var(--color-shadow);
  55. }
  56. .tippy-box[data-theme="menu"] .tippy-content {
  57. padding: 4px 0;
  58. }
  59. .tippy-box[data-theme="menu"] .tippy-svg-arrow-inner {
  60. fill: var(--color-menu);
  61. }
  62. .tippy-box[data-theme="menu"] .item {
  63. display: flex;
  64. align-items: center;
  65. padding: 9px 18px;
  66. color: inherit;
  67. background: inherit;
  68. text-decoration: none;
  69. gap: 10px;
  70. width: 100%;
  71. }
  72. .tippy-box[data-theme="menu"] .item:hover {
  73. background: var(--color-hover);
  74. }
  75. .tippy-box[data-theme="menu"] .item:focus {
  76. background: var(--color-hover);
  77. }
  78. .tippy-box[data-theme="menu"] .item.active {
  79. background: var(--color-active);
  80. }
  81. /* box-with-header theme to look like .ui.attached.segment. can contain .ui.attached.header */
  82. .tippy-box[data-theme="box-with-header"] {
  83. box-shadow: 0 6px 18px var(--color-shadow);
  84. }
  85. .tippy-box[data-theme="box-with-header"] .tippy-content {
  86. background: var(--color-box-body);
  87. border-radius: var(--border-radius);
  88. padding: 0;
  89. }
  90. .tippy-box[data-theme="box-with-header"][data-placement^="top"] .tippy-svg-arrow-inner {
  91. fill: var(--color-box-body);
  92. }
  93. .tippy-box[data-theme="box-with-header"][data-placement^="bottom"] .tippy-svg-arrow-inner {
  94. fill: var(--color-box-header);
  95. }
  96. .tippy-box[data-placement^="top"] > .tippy-svg-arrow {
  97. bottom: 0;
  98. }
  99. .tippy-box[data-placement^="top"] > .tippy-svg-arrow::after,
  100. .tippy-box[data-placement^="top"] > .tippy-svg-arrow > svg {
  101. top: 16px;
  102. transform: rotate(180deg);
  103. }
  104. .tippy-box[data-placement^="bottom"] > .tippy-svg-arrow {
  105. top: 0;
  106. }
  107. .tippy-box[data-placement^="bottom"] > .tippy-svg-arrow > svg {
  108. bottom: 16px;
  109. }
  110. .tippy-box[data-placement^="left"] > .tippy-svg-arrow {
  111. right: 0;
  112. }
  113. .tippy-box[data-placement^="left"] > .tippy-svg-arrow::after,
  114. .tippy-box[data-placement^="left"] > .tippy-svg-arrow > svg {
  115. transform: rotate(90deg);
  116. top: calc(50% - 3px);
  117. left: 11px;
  118. }
  119. .tippy-box[data-placement^="right"] > .tippy-svg-arrow {
  120. left: 0;
  121. }
  122. .tippy-box[data-placement^="right"] > .tippy-svg-arrow::after,
  123. .tippy-box[data-placement^="right"] > .tippy-svg-arrow > svg {
  124. transform: rotate(-90deg);
  125. top: calc(50% - 3px);
  126. right: 11px;
  127. }
  128. .tippy-svg-arrow {
  129. width: 16px;
  130. height: 16px;
  131. text-align: initial;
  132. }
  133. .tippy-svg-arrow,
  134. .tippy-svg-arrow > svg {
  135. position: absolute;
  136. }
  137. .tippy-svg-arrow-outer {
  138. fill: var(--color-secondary);
  139. }
  140. .tippy-svg-arrow-inner {
  141. fill: var(--color-menu);
  142. }