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.

helpers.css 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /*
  2. Gitea's tailwind-style CSS helper classes have `gt-` prefix.
  3. Gitea's private styles use `g-` prefix.
  4. */
  5. .gt-df { display: flex !important; }
  6. .gt-dib { display: inline-block !important; }
  7. .gt-ac { align-items: center !important; }
  8. .gt-jc { justify-content: center !important; }
  9. .gt-je { justify-content: flex-end !important; }
  10. .gt-sb { justify-content: space-between !important; }
  11. .gt-fc { flex-direction: column !important; }
  12. .gt-f1 { flex: 1 !important; }
  13. .gt-fw { flex-wrap: wrap !important; }
  14. .gt-vm { vertical-align: middle !important; }
  15. .gt-w-100 { width: 100% !important; }
  16. .gt-h-100 { height: 100% !important; }
  17. .gt-mono {
  18. font-family: var(--fonts-monospace) !important;
  19. font-size: .95em !important; /* compensate for monospace fonts being usually slightly larger */
  20. }
  21. .gt-word-break {
  22. word-wrap: break-word !important;
  23. word-break: break-word; /* compat: Safari */
  24. overflow-wrap: anywhere;
  25. }
  26. .gt-ellipsis {
  27. overflow: hidden !important;
  28. white-space: nowrap !important;
  29. text-overflow: ellipsis !important;
  30. }
  31. .g-table-auto-ellipsis td.auto-ellipsis {
  32. position: relative;
  33. }
  34. .g-table-auto-ellipsis td.auto-ellipsis span {
  35. position: absolute;
  36. left: 0;
  37. right: 0;
  38. top: 0;
  39. bottom: 0;
  40. padding: inherit;
  41. white-space: nowrap;
  42. overflow: hidden;
  43. text-overflow: ellipsis;
  44. }
  45. .gt-max-width-12rem { max-width: 12rem !important; }
  46. .gt-max-width-24rem { max-width: 24rem !important; }
  47. /* below class names match Tailwind CSS */
  48. .gt-break-all { word-break: break-all !important; }
  49. .gt-content-center { align-content: center !important; }
  50. .gt-cursor-default { cursor: default !important; }
  51. .gt-cursor-pointer { cursor: pointer !important; }
  52. .gt-cursor-grab { cursor: grab !important; }
  53. .gt-invisible { visibility: hidden !important; }
  54. .gt-items-start { align-items: flex-start !important; }
  55. .gt-pointer-events-none { pointer-events: none !important; }
  56. .gt-relative { position: relative !important; }
  57. .gt-whitespace-nowrap { white-space: nowrap !important; }
  58. .gt-whitespace-pre { white-space: pre !important; }
  59. .gt-whitespace-pre-wrap { white-space: pre-wrap !important; }
  60. .gt-object-contain { object-fit: contain !important; }
  61. .gt-self-center { align-self: center !important; }
  62. .gt-self-start { align-self: flex-start !important; }
  63. .gt-self-end { align-self: flex-end !important; }
  64. .gt-no-underline { text-decoration-line: none !important; }
  65. .gt-w-auto { width: auto !important; }
  66. .gt-normal-case { text-transform: none !important; }
  67. .gt-italic { font-style: italic !important; }
  68. .gt-overflow-x-auto { overflow-x: auto !important; }
  69. .gt-overflow-x-scroll { overflow-x: scroll !important; }
  70. .gt-overflow-y-hidden { overflow-y: hidden !important; }
  71. .gt-w-screen { width: 100vw !important; }
  72. .gt-h-screen { height: 100vh !important; }
  73. .gt-float-left { float: left !important; }
  74. .gt-float-right { float: right !important; }
  75. .gt-clear-both { clear: both !important; }
  76. .gt-text-center { text-align: center !important; }
  77. .gt-text-left { text-align: left !important; }
  78. .gt-text-right { text-align: right !important; }
  79. .gt-font-light { font-weight: var(--font-weight-light) !important; }
  80. .gt-font-normal { font-weight: var(--font-weight-normal) !important; }
  81. .gt-font-medium { font-weight: var(--font-weight-medium) !important; }
  82. .gt-font-semibold { font-weight: var(--font-weight-semibold) !important; }
  83. .gt-font-bold { font-weight: var(--font-weight-bold) !important; }
  84. .gt-rounded { border-radius: var(--border-radius) !important; }
  85. .gt-rounded-top { border-radius: var(--border-radius) var(--border-radius) 0 0 !important; }
  86. .gt-rounded-bottom { border-radius: 0 0 var(--border-radius) var(--border-radius) !important; }
  87. .gt-rounded-left { border-radius: var(--border-radius) 0 0 var(--border-radius) !important; }
  88. .gt-rounded-right { border-radius: 0 var(--border-radius) var(--border-radius) 0 !important; }
  89. .gt-border-secondary { border: 1px solid var(--color-secondary) !important; }
  90. .gt-border-secondary-top { border-top: 1px solid var(--color-secondary) !important; }
  91. .gt-border-secondary-bottom { border-bottom: 1px solid var(--color-secondary) !important; }
  92. .gt-border-secondary-left { border-left: 1px solid var(--color-secondary) !important; }
  93. .gt-border-secondary-right { border-right: 1px solid var(--color-secondary) !important; }
  94. .gt-no-transition { transition: none !important; }
  95. .gt-bg-red { background: var(--color-red) !important; }
  96. .gt-bg-orange { background: var(--color-orange) !important; }
  97. .gt-bg-yellow { background: var(--color-yellow) !important; }
  98. .gt-bg-olive { background: var(--color-olive) !important; }
  99. .gt-bg-green { background: var(--color-green) !important; }
  100. .gt-bg-teal { background: var(--color-teal) !important; }
  101. .gt-bg-blue { background: var(--color-blue) !important; }
  102. .gt-bg-violet { background: var(--color-violet) !important; }
  103. .gt-bg-purple { background: var(--color-purple) !important; }
  104. .gt-bg-pink { background: var(--color-pink) !important; }
  105. .gt-bg-brown { background: var(--color-brown) !important; }
  106. .gt-bg-grey { background: var(--color-grey) !important; }
  107. .gt-bg-gold { background: var(--color-gold) !important; }
  108. .gt-bg-transparent { background: transparent !important; }
  109. .gt-text-white { color: var(--color-white) !important; }
  110. .interact-fg { color: inherit !important; }
  111. .interact-fg:hover { color: var(--color-primary) !important; }
  112. .interact-fg:active { color: var(--color-primary-active) !important; }
  113. .interact-bg { background: transparent !important; }
  114. .interact-bg:hover { background: var(--color-hover) !important; }
  115. .interact-bg:active { background: var(--color-active) !important; }
  116. .gt-m-0 { margin: 0 !important; }
  117. .gt-m-1 { margin: .125rem !important; }
  118. .gt-m-2 { margin: .25rem !important; }
  119. .gt-m-3 { margin: .5rem !important; }
  120. .gt-m-4 { margin: 1rem !important; }
  121. .gt-m-5 { margin: 2rem !important; }
  122. .gt-ml-0 { margin-left: 0 !important; }
  123. .gt-ml-1 { margin-left: .125rem !important; }
  124. .gt-ml-2 { margin-left: .25rem !important; }
  125. .gt-ml-3 { margin-left: .5rem !important; }
  126. .gt-ml-4 { margin-left: 1rem !important; }
  127. .gt-ml-5 { margin-left: 2rem !important; }
  128. .gt-mr-0 { margin-right: 0 !important; }
  129. .gt-mr-1 { margin-right: .125rem !important; }
  130. .gt-mr-2 { margin-right: .25rem !important; }
  131. .gt-mr-3 { margin-right: .5rem !important; }
  132. .gt-mr-4 { margin-right: 1rem !important; }
  133. .gt-mr-5 { margin-right: 2rem !important; }
  134. .gt-mt-0 { margin-top: 0 !important; }
  135. .gt-mt-1 { margin-top: .125rem !important; }
  136. .gt-mt-2 { margin-top: .25rem !important; }
  137. .gt-mt-3 { margin-top: .5rem !important; }
  138. .gt-mt-4 { margin-top: 1rem !important; }
  139. .gt-mt-5 { margin-top: 2rem !important; }
  140. .gt-mb-0 { margin-bottom: 0 !important; }
  141. .gt-mb-1 { margin-bottom: .125rem !important; }
  142. .gt-mb-2 { margin-bottom: .25rem !important; }
  143. .gt-mb-3 { margin-bottom: .5rem !important; }
  144. .gt-mb-4 { margin-bottom: 1rem !important; }
  145. .gt-mb-5 { margin-bottom: 2rem !important; }
  146. .gt-mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
  147. .gt-mx-1 { margin-left: .125rem !important; margin-right: .125rem !important; }
  148. .gt-mx-2 { margin-left: .25rem !important; margin-right: .25rem !important; }
  149. .gt-mx-3 { margin-left: .5rem !important; margin-right: .5rem !important; }
  150. .gt-mx-4 { margin-left: 1rem !important; margin-right: 1rem !important; }
  151. .gt-mx-5 { margin-left: 2rem !important; margin-right: 2rem !important; }
  152. .gt-my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
  153. .gt-my-1 { margin-top: .125rem !important; margin-bottom: .125rem !important; }
  154. .gt-my-2 { margin-top: .25rem !important; margin-bottom: .25rem !important; }
  155. .gt-my-3 { margin-top: .5rem !important; margin-bottom: .5rem !important; }
  156. .gt-my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
  157. .gt-my-5 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
  158. .gt-m-auto { margin: auto !important; }
  159. .gt-mx-auto { margin-left: auto !important; margin-right: auto !important; }
  160. .gt-my-auto { margin-top: auto !important; margin-bottom: auto !important; }
  161. .gt-mt-auto { margin-top: auto !important; }
  162. .gt-mr-auto { margin-right: auto !important; }
  163. .gt-mb-auto { margin-bottom: auto !important; }
  164. .gt-ml-auto { margin-left: auto !important; }
  165. .gt-p-0 { padding: 0 !important; }
  166. .gt-p-1 { padding: .125rem !important; }
  167. .gt-p-2 { padding: .25rem !important; }
  168. .gt-p-3 { padding: .5rem !important; }
  169. .gt-p-4 { padding: 1rem !important; }
  170. .gt-p-5 { padding: 2rem !important; }
  171. .gt-pl-0 { padding-left: 0 !important; }
  172. .gt-pl-1 { padding-left: .125rem !important; }
  173. .gt-pl-2 { padding-left: .25rem !important; }
  174. .gt-pl-3 { padding-left: .5rem !important; }
  175. .gt-pl-4 { padding-left: 1rem !important; }
  176. .gt-pl-5 { padding-left: 2rem !important; }
  177. .gt-pr-0 { padding-right: 0 !important; }
  178. .gt-pr-1 { padding-right: .125rem !important; }
  179. .gt-pr-2 { padding-right: .25rem !important; }
  180. .gt-pr-3 { padding-right: .5rem !important; }
  181. .gt-pr-4 { padding-right: 1rem !important; }
  182. .gt-pr-5 { padding-right: 2rem !important; }
  183. .gt-pt-0 { padding-top: 0 !important; }
  184. .gt-pt-1 { padding-top: .125rem !important; }
  185. .gt-pt-2 { padding-top: .25rem !important; }
  186. .gt-pt-3 { padding-top: .5rem !important; }
  187. .gt-pt-4 { padding-top: 1rem !important; }
  188. .gt-pt-5 { padding-top: 2rem !important; }
  189. .gt-pb-0 { padding-bottom: 0 !important; }
  190. .gt-pb-1 { padding-bottom: .125rem !important; }
  191. .gt-pb-2 { padding-bottom: .25rem !important; }
  192. .gt-pb-3 { padding-bottom: .5rem !important; }
  193. .gt-pb-4 { padding-bottom: 1rem !important; }
  194. .gt-pb-5 { padding-bottom: 2rem !important; }
  195. .gt-px-0 { padding-left: 0 !important; padding-right: 0 !important; }
  196. .gt-px-1 { padding-left: .125rem !important; padding-right: .125rem !important; }
  197. .gt-px-2 { padding-left: .25rem !important; padding-right: .25rem !important; }
  198. .gt-px-3 { padding-left: .5rem !important; padding-right: .5rem !important; }
  199. .gt-px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
  200. .gt-px-5 { padding-left: 2rem !important; padding-right: 2rem !important; }
  201. .gt-py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
  202. .gt-py-1 { padding-top: .125rem !important; padding-bottom: .125rem !important; }
  203. .gt-py-2 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
  204. .gt-py-3 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
  205. .gt-py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  206. .gt-py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  207. .gt-gap-0 { gap: 0 !important; }
  208. .gt-gap-1 { gap: .125rem !important; }
  209. .gt-gap-2 { gap: .25rem !important; }
  210. .gt-gap-3 { gap: .5rem !important; }
  211. .gt-gap-4 { gap: 1rem !important; }
  212. .gt-gap-5 { gap: 2rem !important; }
  213. .gt-gap-x-0 { column-gap: 0 !important; }
  214. .gt-gap-x-1 { column-gap: .125rem !important; }
  215. .gt-gap-x-2 { column-gap: .25rem !important; }
  216. .gt-gap-x-3 { column-gap: .5rem !important; }
  217. .gt-gap-x-4 { column-gap: 1rem !important; }
  218. .gt-gap-x-5 { column-gap: 2rem !important; }
  219. .gt-gap-y-0 { row-gap: 0 !important; }
  220. .gt-gap-y-1 { row-gap: .125rem !important; }
  221. .gt-gap-y-2 { row-gap: .25rem !important; }
  222. .gt-gap-y-3 { row-gap: .5rem !important; }
  223. .gt-gap-y-4 { row-gap: 1rem !important; }
  224. .gt-gap-y-5 { row-gap: 2rem !important; }
  225. .gt-shrink-0 { flex-shrink: 0 !important; }
  226. .gt-font-12 { font-size: 12px !important }
  227. .gt-font-13 { font-size: 13px !important }
  228. .gt-font-14 { font-size: 14px !important }
  229. .gt-font-15 { font-size: 15px !important }
  230. .gt-font-16 { font-size: 16px !important }
  231. .gt-font-17 { font-size: 17px !important }
  232. .gt-font-18 { font-size: 18px !important }
  233. /*
  234. gt-hidden must be placed after all other "display: xxx !important" classes to win the chance
  235. do not use:
  236. * "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex"
  237. * ".hidden" class: it has been polluted by Fomantic UI in many cases
  238. * inline style="display: none": it's difficult to tweak
  239. * jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important"
  240. only use:
  241. * this ".gt-hidden" class
  242. * showElem/hideElem/toggleElem functions in "utils/dom.js"
  243. */
  244. .gt-hidden { display: none !important; }