gitea源码

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. /* based on Fomantic UI segment module, with just the parts extracted that we use. If you find any
  2. unused rules here after refactoring, please remove them. */
  3. .ui.table {
  4. width: 100%;
  5. margin: 1em 0;
  6. border: 1px solid var(--color-secondary);
  7. border-radius: 0.28571429rem;
  8. vertical-align: middle;
  9. border-collapse: separate;
  10. border-spacing: 0;
  11. color: var(--color-text);
  12. background: var(--color-box-body);
  13. border-color: var(--color-secondary);
  14. text-align: start;
  15. }
  16. .ui.table:first-child {
  17. margin-top: 0;
  18. }
  19. .ui.table:last-child {
  20. margin-bottom: 0;
  21. }
  22. .ui.table > thead,
  23. .ui.table > tbody {
  24. text-align: inherit;
  25. vertical-align: inherit;
  26. }
  27. .ui.table > thead > tr > th {
  28. background: var(--color-box-header);
  29. text-align: inherit;
  30. color: var(--color-text);
  31. padding: 6px 5px;
  32. vertical-align: inherit;
  33. font-weight: var(--font-weight-normal);
  34. border-bottom: 1px solid var(--color-secondary);
  35. border-left: none;
  36. }
  37. .ui.table > thead > tr > th:first-child {
  38. border-left: none;
  39. }
  40. .ui.table > thead > tr:first-child > th:first-child {
  41. border-radius: 0.28571429rem 0 0;
  42. }
  43. .ui.table > thead > tr:first-child > th:last-child {
  44. border-radius: 0 0.28571429rem 0 0;
  45. }
  46. .ui.table > thead > tr:first-child > th:only-child {
  47. border-radius: 0.28571429rem 0.28571429rem 0 0;
  48. }
  49. .ui.table > tfoot > tr > th,
  50. .ui.table > tfoot > tr > td {
  51. border-top: 1px solid var(--color-secondary);
  52. background: var(--color-box-body);
  53. text-align: inherit;
  54. color: var(--color-text);
  55. padding: 0.78571429em;
  56. vertical-align: inherit;
  57. font-weight: var(--font-weight-normal);
  58. }
  59. .ui.table > tfoot > tr > th:first-child,
  60. .ui.table > tfoot > tr > td:first-child {
  61. border-left: none;
  62. }
  63. .ui.table > tfoot > tr:first-child > th:first-child,
  64. .ui.table > tfoot > tr:first-child > td:first-child {
  65. border-radius: 0 0 0 0.28571429rem;
  66. }
  67. .ui.table > tfoot > tr:first-child > th:last-child,
  68. .ui.table > tfoot > tr:first-child > td:last-child {
  69. border-radius: 0 0 0.28571429rem;
  70. }
  71. .ui.table > tfoot > tr:first-child > th:only-child,
  72. .ui.table > tfoot > tr:first-child > td:only-child {
  73. border-radius: 0 0 0.28571429rem 0.28571429rem;
  74. }
  75. .ui.table > tr > td,
  76. .ui.table > tbody > tr > td {
  77. border-top: 1px solid var(--color-secondary-alpha-50);
  78. padding: 6px 5px;
  79. text-align: inherit;
  80. }
  81. .ui.table > tr:first-child > td,
  82. .ui.table > tbody > tr:first-child > td {
  83. border-top: none;
  84. }
  85. .ui.table.segment {
  86. padding: 0;
  87. }
  88. .ui.table.segment::after {
  89. display: none;
  90. }
  91. @media only screen and (max-width: 767.98px) {
  92. .ui.table:not(.unstackable) {
  93. width: 100%;
  94. padding: 0;
  95. }
  96. .ui.table:not(.unstackable) > thead,
  97. .ui.table:not(.unstackable) > thead > tr,
  98. .ui.table:not(.unstackable) > tfoot,
  99. .ui.table:not(.unstackable) > tfoot > tr,
  100. .ui.table:not(.unstackable) > tbody,
  101. .ui.table:not(.unstackable) > tr,
  102. .ui.table:not(.unstackable) > tbody > tr,
  103. .ui.table:not(.unstackable) > tr > th,
  104. .ui.table:not(.unstackable) > thead > tr > th,
  105. .ui.table:not(.unstackable) > tbody > tr > th,
  106. .ui.table:not(.unstackable) > tfoot > tr > th,
  107. .ui.table:not(.unstackable) > tr > td,
  108. .ui.table:not(.unstackable) > tbody > tr > td,
  109. .ui.table:not(.unstackable) > tfoot > tr > td {
  110. display: block !important;
  111. width: auto !important;
  112. }
  113. .ui.table:not(.unstackable) > thead {
  114. display: block;
  115. }
  116. .ui.table:not(.unstackable) > tfoot {
  117. display: block;
  118. }
  119. .ui.ui.ui.ui.table:not(.unstackable) > tr,
  120. .ui.ui.ui.ui.table:not(.unstackable) > thead > tr,
  121. .ui.ui.ui.ui.table:not(.unstackable) > tbody > tr,
  122. .ui.ui.ui.ui.table:not(.unstackable) > tfoot > tr {
  123. padding-top: 1em;
  124. padding-bottom: 1em;
  125. }
  126. .ui.ui.ui.ui.table:not(.unstackable) > tr > th,
  127. .ui.ui.ui.ui.table:not(.unstackable) > thead > tr > th,
  128. .ui.ui.ui.ui.table:not(.unstackable) > tbody > tr > th,
  129. .ui.ui.ui.ui.table:not(.unstackable) > tfoot > tr > th,
  130. .ui.ui.ui.ui.table:not(.unstackable) > tr > td,
  131. .ui.ui.ui.ui.table:not(.unstackable) > tbody > tr > td,
  132. .ui.ui.ui.ui.table:not(.unstackable) > tfoot > tr > td {
  133. background: none;
  134. border: none;
  135. padding: 0.25em 0.75em;
  136. }
  137. .ui.table:not(.unstackable) > tr > th:first-child,
  138. .ui.table:not(.unstackable) > thead > tr > th:first-child,
  139. .ui.table:not(.unstackable) > tbody > tr > th:first-child,
  140. .ui.table:not(.unstackable) > tfoot > tr > th:first-child,
  141. .ui.table:not(.unstackable) > tr > td:first-child,
  142. .ui.table:not(.unstackable) > tbody > tr > td:first-child,
  143. .ui.table:not(.unstackable) > tfoot > tr > td:first-child {
  144. font-weight: var(--font-weight-normal);
  145. }
  146. }
  147. .ui.table th.collapsing,
  148. .ui.table td.collapsing {
  149. width: 1px;
  150. white-space: nowrap;
  151. }
  152. .ui.fixed.table {
  153. table-layout: fixed;
  154. }
  155. .ui.fixed.table th,
  156. .ui.fixed.table td {
  157. overflow: hidden;
  158. text-overflow: ellipsis;
  159. }
  160. .ui.selectable.table > tbody > tr:hover,
  161. .ui.table tbody tr td.selectable:hover {
  162. background: var(--color-hover);
  163. }
  164. .ui.attached.table {
  165. top: 0;
  166. bottom: 0;
  167. border-radius: 0;
  168. margin: 0 -1px;
  169. width: calc(100% + 2px);
  170. max-width: calc(100% + 2px);
  171. border: 1px solid var(--color-secondary);
  172. }
  173. .ui.attached + .ui.attached.table:not(.top) {
  174. border-top: none;
  175. }
  176. .ui[class*="bottom attached"].table {
  177. bottom: 0;
  178. margin-top: 0;
  179. top: 0;
  180. margin-bottom: 1em;
  181. border-radius: 0 0 0.28571429rem 0.28571429rem;
  182. }
  183. .ui[class*="bottom attached"].table:last-child {
  184. margin-bottom: 0;
  185. }
  186. .ui.striped.table > tr:nth-child(2n),
  187. .ui.striped.table > tbody > tr:nth-child(2n) {
  188. background: var(--color-light);
  189. }
  190. .ui.table[class*="single line"],
  191. .ui.table [class*="single line"] {
  192. white-space: nowrap;
  193. }
  194. /* Column Width */
  195. .ui.table th.one.wide,
  196. .ui.table td.one.wide {
  197. width: 6.25%;
  198. }
  199. .ui.table th.two.wide,
  200. .ui.table td.two.wide {
  201. width: 12.5%;
  202. }
  203. .ui.table th.three.wide,
  204. .ui.table td.three.wide {
  205. width: 18.75%;
  206. }
  207. .ui.table th.four.wide,
  208. .ui.table td.four.wide {
  209. width: 25%;
  210. }
  211. .ui.table th.five.wide,
  212. .ui.table td.five.wide {
  213. width: 31.25%;
  214. }
  215. .ui.table th.six.wide,
  216. .ui.table td.six.wide {
  217. width: 37.5%;
  218. }
  219. .ui.table th.seven.wide,
  220. .ui.table td.seven.wide {
  221. width: 43.75%;
  222. }
  223. .ui.table th.eight.wide,
  224. .ui.table td.eight.wide {
  225. width: 50%;
  226. }
  227. .ui.table th.nine.wide,
  228. .ui.table td.nine.wide {
  229. width: 56.25%;
  230. }
  231. .ui.table th.ten.wide,
  232. .ui.table td.ten.wide {
  233. width: 62.5%;
  234. }
  235. .ui.table th.eleven.wide,
  236. .ui.table td.eleven.wide {
  237. width: 68.75%;
  238. }
  239. .ui.table th.twelve.wide,
  240. .ui.table td.twelve.wide {
  241. width: 75%;
  242. }
  243. .ui.table th.thirteen.wide,
  244. .ui.table td.thirteen.wide {
  245. width: 81.25%;
  246. }
  247. .ui.table th.fourteen.wide,
  248. .ui.table td.fourteen.wide {
  249. width: 87.5%;
  250. }
  251. .ui.table th.fifteen.wide,
  252. .ui.table td.fifteen.wide {
  253. width: 93.75%;
  254. }
  255. .ui.table th.sixteen.wide,
  256. .ui.table td.sixteen.wide {
  257. width: 100%;
  258. }
  259. .ui.basic.table {
  260. background: transparent;
  261. border: 1px solid var(--color-secondary);
  262. }
  263. .ui.basic.table > thead > tr > th,
  264. .ui.basic.table > tbody > tr > th,
  265. .ui.basic.table > tfoot > tr > th,
  266. .ui.basic.table > tr > th {
  267. background: transparent;
  268. border-left: none;
  269. }
  270. .ui.basic.table > tbody > tr {
  271. border-bottom: 1px solid var(--color-secondary);
  272. }
  273. .ui.basic.table > tbody > tr > td,
  274. .ui.basic.table > tfoot > tr > td,
  275. .ui.basic.table > tr > td {
  276. background: transparent;
  277. }
  278. .ui.basic.striped.table > tbody > tr:nth-child(2n) {
  279. background: var(--color-light);
  280. }
  281. .ui.basic.striped.selectable.table > tbody > tr:nth-child(2n):hover {
  282. background: var(--color-hover);
  283. }
  284. .ui[class*="very basic"].table {
  285. border: none;
  286. }
  287. .ui[class*="very basic"].table:not(.striped) > tr > th:first-child,
  288. .ui[class*="very basic"].table:not(.striped) > thead > tr > th:first-child,
  289. .ui[class*="very basic"].table:not(.striped) > tbody > tr > th:first-child,
  290. .ui[class*="very basic"].table:not(.striped) > tfoot > tr > th:first-child,
  291. .ui[class*="very basic"].table:not(.striped) > tr > td:first-child,
  292. .ui[class*="very basic"].table:not(.striped) > tbody > tr > td:first-child,
  293. .ui[class*="very basic"].table:not(.striped) > tfoot > tr > td:first-child {
  294. padding-left: 0;
  295. }
  296. .ui[class*="very basic"].table:not(.striped) > tr > th:last-child,
  297. .ui[class*="very basic"].table:not(.striped) > thead > tr > th:last-child,
  298. .ui[class*="very basic"].table:not(.striped) > tbody > tr > th:last-child,
  299. .ui[class*="very basic"].table:not(.striped) > tfoot > tr > th:last-child,
  300. .ui[class*="very basic"].table:not(.striped) > tr > td:last-child,
  301. .ui[class*="very basic"].table:not(.striped) > tbody > tr > td:last-child,
  302. .ui[class*="very basic"].table:not(.striped) > tfoot > tr > td:last-child {
  303. padding-right: 0;
  304. }
  305. .ui[class*="very basic"].table:not(.striped) > thead > tr:first-child > th {
  306. padding-top: 0;
  307. }
  308. .ui.celled.table > tr > th,
  309. .ui.celled.table > thead > tr > th,
  310. .ui.celled.table > tbody > tr > th,
  311. .ui.celled.table > tfoot > tr > th,
  312. .ui.celled.table > tr > td,
  313. .ui.celled.table > tbody > tr > td,
  314. .ui.celled.table > tfoot > tr > td {
  315. border-left: 1px solid var(--color-secondary-alpha-50);
  316. }
  317. .ui.celled.table > tr > th:first-child,
  318. .ui.celled.table > thead > tr > th:first-child,
  319. .ui.celled.table > tbody > tr > th:first-child,
  320. .ui.celled.table > tfoot > tr > th:first-child,
  321. .ui.celled.table > tr > td:first-child,
  322. .ui.celled.table > tbody > tr > td:first-child,
  323. .ui.celled.table > tfoot > tr > td:first-child {
  324. border-left: none;
  325. }
  326. .ui.compact.table > tr > th,
  327. .ui.compact.table > thead > tr > th,
  328. .ui.compact.table > tbody > tr > th,
  329. .ui.compact.table > tfoot > tr > th {
  330. padding-left: 0.7em;
  331. padding-right: 0.7em;
  332. }
  333. .ui.compact.table > tr > td,
  334. .ui.compact.table > tbody > tr > td,
  335. .ui.compact.table > tfoot > tr > td {
  336. padding: 0.5em 0.7em;
  337. }
  338. /* use more horizontal padding on first and last items for visuals */
  339. .ui.table > thead > tr > th:first-of-type,
  340. .ui.table > tbody > tr > td:first-of-type,
  341. .ui.table > tr > td:first-of-type {
  342. padding-left: 10px;
  343. }
  344. .ui.table > thead > tr > th:last-of-type,
  345. .ui.table > tbody > tr > td:last-of-type,
  346. .ui.table > tr > td:last-of-type {
  347. padding-right: 10px;
  348. }