gitea源码

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156
  1. :root {
  2. /* fonts */
  3. --fonts-proportional: -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial;
  4. --fonts-monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, var(--fonts-emoji);
  5. /* GitHub explicitly sets font names like: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla";
  6. Actually "Twemoji Mozilla" emoji font is widely used by browsers like Firefox, Pale Moon, and it is more likely up-to-dated than the system emoji font.
  7. So not setting emoji font seems to be the best choice, here we just use a non-existing dummy font name and let browsers choose. */
  8. --fonts-emoji: -emoji-fallback;
  9. /* font weights - use between 400 and 600 for general purposes. Avoid 700 as it is perceived too bold */
  10. --font-weight-light: 300;
  11. --font-weight-normal: 400;
  12. --font-weight-medium: 500;
  13. --font-weight-semibold: 600;
  14. --font-weight-bold: 700;
  15. /* line-height: use the default value as "modules/normalize.css" */
  16. --line-height-default: normal;
  17. /* images */
  18. --checkbox-mask-checked: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 18 18" width="16" height="16"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>');
  19. --checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z"></path></svg>');
  20. --octicon-chevron-right: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"></path></svg>');
  21. /* other variables */
  22. --border-radius: 4px;
  23. --border-radius-medium: 6px;
  24. --border-radius-full: 99999px; /* TODO: use calc(infinity * 1px) */
  25. --opacity-disabled: 0.55;
  26. --height-loading: 16rem;
  27. --min-height-textarea: 132px; /* padding + 6 lines + border = calc(1.57142em + 6lh + 2px), but lh is not fully supported */
  28. --tab-size: 4;
  29. --checkbox-size: 15px; /* height and width of checkbox and radio inputs */
  30. --page-spacing: 16px; /* space between page elements */
  31. --page-margin-x: 32px; /* minimum space on left and right side of page */
  32. --page-space-bottom: 64px; /* space between last page element and footer */
  33. /* z-index */
  34. --z-index-modal: 1001; /* modal dialog, hard-coded from Fomantic modal.css */
  35. --z-index-toast: 1002; /* should be larger than modal */
  36. --font-size-label: 12px; /* font size of individual labels */
  37. --gap-inline: 0.25rem; /* gap for inline texts and elements, for example: the spaces for sentence with labels, button text, etc */
  38. --gap-block: 0.5rem; /* gap for element blocks, for example: spaces between buttons, menu image & title, header icon & title etc */
  39. }
  40. @media (min-width: 768px) and (max-width: 1200px) {
  41. :root {
  42. --page-margin-x: 16px;
  43. }
  44. }
  45. @media (max-width: 767.98px) {
  46. :root {
  47. --page-margin-x: 8px;
  48. }
  49. }
  50. :root * {
  51. --fonts-regular: var(--fonts-override, var(--fonts-proportional)), "Noto Sans", "Liberation Sans", sans-serif, var(--fonts-emoji);
  52. }
  53. *, ::before, ::after {
  54. /* these are needed for tailwind borders to work because we do not load tailwind's base
  55. https://github.com/tailwindlabs/tailwindcss/blob/master/src/css/preflight.css */
  56. border-width: 0;
  57. border-style: solid;
  58. border-color: currentcolor;
  59. }
  60. html, body {
  61. height: 100%;
  62. font-size: 14px;
  63. }
  64. body {
  65. line-height: 20px;
  66. font-family: var(--fonts-regular);
  67. color: var(--color-text);
  68. background-color: var(--color-body);
  69. tab-size: var(--tab-size);
  70. display: flex;
  71. flex-direction: column;
  72. overflow-x: visible;
  73. overflow-wrap: break-word;
  74. }
  75. textarea {
  76. font-family: var(--fonts-regular);
  77. }
  78. pre,
  79. code,
  80. kbd,
  81. samp {
  82. font-family: var(--fonts-monospace);
  83. }
  84. pre,
  85. code,
  86. kbd,
  87. samp,
  88. .tw-font-mono {
  89. font-size: 0.95em; /* compensate for monospace fonts being usually slightly larger */
  90. }
  91. b,
  92. strong,
  93. h1,
  94. h2,
  95. h3,
  96. h4,
  97. h5,
  98. h6 {
  99. font-weight: var(--font-weight-semibold);
  100. }
  101. h1,
  102. h2,
  103. h3,
  104. h4,
  105. h5 {
  106. line-height: 1.28571429;
  107. margin: calc(2rem - 0.1428571428571429em) 0 1rem;
  108. font-weight: var(--font-weight-medium);
  109. padding: 0;
  110. }
  111. h1 {
  112. min-height: 1rem;
  113. font-size: 2rem;
  114. }
  115. h2 {
  116. font-size: 1.71428571rem;
  117. }
  118. h3 {
  119. font-size: 1.28571429rem;
  120. }
  121. h4 {
  122. font-size: 1.07142857rem;
  123. }
  124. h5 {
  125. font-size: 1rem;
  126. }
  127. h1:first-child,
  128. h2:first-child,
  129. h3:first-child,
  130. h4:first-child,
  131. h5:first-child {
  132. margin-top: 0;
  133. }
  134. h1:last-child,
  135. h2:last-child,
  136. h3:last-child,
  137. h4:last-child,
  138. h5:last-child {
  139. margin-bottom: 0;
  140. }
  141. p {
  142. margin: 0 0 1em;
  143. line-height: 1.4285;
  144. }
  145. p:first-child {
  146. margin-top: 0;
  147. }
  148. p:last-child {
  149. margin-bottom: 0;
  150. }
  151. table {
  152. border-collapse: collapse;
  153. }
  154. button {
  155. cursor: pointer;
  156. }
  157. details summary {
  158. cursor: pointer;
  159. }
  160. progress {
  161. background: var(--color-secondary-dark-1);
  162. border-radius: var(--border-radius);
  163. border: none;
  164. overflow: hidden;
  165. }
  166. progress::-webkit-progress-bar {
  167. background: var(--color-secondary-dark-1);
  168. }
  169. progress::-webkit-progress-value {
  170. background-color: var(--color-accent);
  171. }
  172. progress::-moz-progress-bar {
  173. background-color: var(--color-accent);
  174. }
  175. * {
  176. caret-color: var(--color-caret);
  177. }
  178. ::file-selector-button {
  179. border: 1px solid var(--color-light-border);
  180. color: var(--color-text-light);
  181. background: var(--color-light);
  182. border-radius: var(--border-radius);
  183. }
  184. ::file-selector-button:hover {
  185. color: var(--color-text);
  186. background: var(--color-hover);
  187. }
  188. ::selection {
  189. background: var(--color-primary-light-1);
  190. color: var(--color-white);
  191. }
  192. ::placeholder,
  193. .ui.dropdown:not(.button) > .default.text,
  194. .ui.default.dropdown:not(.button) > .text {
  195. color: var(--color-placeholder-text) !important;
  196. opacity: 1 !important;
  197. }
  198. .unselectable,
  199. .btn,
  200. .button,
  201. .lines-num,
  202. .lines-commit,
  203. .lines-commit .blame-info,
  204. .ellipsis-button {
  205. -webkit-touch-callout: none;
  206. -webkit-user-select: none;
  207. user-select: none;
  208. }
  209. a {
  210. color: var(--color-primary);
  211. cursor: pointer;
  212. text-decoration-line: none;
  213. text-decoration-skip-ink: all;
  214. }
  215. a:hover {
  216. text-decoration-line: underline;
  217. }
  218. /* a = always colored, underlined on hover */
  219. /* a.muted = colored on hover, underlined on hover */
  220. /* a.suppressed = never colored, underlined on hover */
  221. /* a.silenced = never colored, never underlined */
  222. a.muted,
  223. a.suppressed,
  224. a.silenced,
  225. .muted-links a {
  226. color: inherit;
  227. }
  228. a:hover,
  229. a.suppressed:hover,
  230. a.muted:hover,
  231. a.muted:hover [class*="color-text"],
  232. .muted-links a:hover {
  233. color: var(--color-primary);
  234. }
  235. a.silenced:hover,
  236. a.suppressed:hover {
  237. color: inherit;
  238. }
  239. a.silenced:hover {
  240. text-decoration-line: none;
  241. }
  242. a.label,
  243. .ui.search .results a,
  244. .ui .menu a,
  245. .ui.cards a.card,
  246. .issue-keyword a {
  247. text-decoration-line: none !important;
  248. }
  249. .ui.search > .results {
  250. background: var(--color-body);
  251. border-color: var(--color-secondary);
  252. overflow-wrap: anywhere; /* allow text to wrap as fomantic limits this to 18em width */
  253. }
  254. .ui.search > .results .result {
  255. background: var(--color-body);
  256. border-color: var(--color-secondary);
  257. display: flex;
  258. align-items: center;
  259. }
  260. .ui.search > .results .result .title {
  261. color: var(--color-text-dark);
  262. }
  263. .ui.search > .results .result .description {
  264. color: var(--color-text-light-2);
  265. }
  266. .ui.search > .results .result .image {
  267. width: auto;
  268. height: auto;
  269. }
  270. .ui.search > .results .result:hover,
  271. .ui.category.search > .results .category .result:hover {
  272. background: var(--color-hover);
  273. }
  274. .empty-placeholder {
  275. display: flex;
  276. flex-direction: column;
  277. align-items: center;
  278. padding-top: 40px;
  279. padding-bottom: 40px;
  280. text-align: center;
  281. text-wrap: balance;
  282. }
  283. .inline-code-block {
  284. padding: 2px 4px;
  285. border-radius: .24em;
  286. background-color: var(--color-label-bg);
  287. }
  288. .ui.menu .dropdown.item:hover,
  289. .ui.menu a.item:hover,
  290. .ui.menu details.item summary:hover {
  291. color: var(--color-text);
  292. background: var(--color-hover);
  293. }
  294. /* slightly more contrast for filters on issue list */
  295. .ui.ui.menu .dropdown.item.disabled {
  296. color: var(--color-text-light-2);
  297. }
  298. .ui.dropdown .menu {
  299. background: var(--color-menu);
  300. border-color: var(--color-secondary);
  301. }
  302. .ui.dropdown .menu > .header {
  303. text-transform: none; /* reset fomantic's "uppercase" */
  304. }
  305. .ui.dropdown .menu > .header:not(.ui) {
  306. color: var(--color-text);
  307. font-size: 0.95em; /* reset fomantic's small font-size */
  308. }
  309. .ui.dropdown .menu > .item {
  310. color: var(--color-text);
  311. line-height: var(--line-height-default);
  312. }
  313. .ui.dropdown .menu > .item:hover {
  314. color: var(--color-text);
  315. background: var(--color-hover);
  316. }
  317. .ui.dropdown .menu > .item:active {
  318. color: var(--color-text);
  319. background: var(--color-active);
  320. }
  321. .ui.dropdown .menu .active.item {
  322. color: var(--color-text);
  323. background: var(--color-active);
  324. border-radius: 0;
  325. font-weight: var(--font-weight-normal);
  326. }
  327. /* fix misaligned images in webhook dropdown */
  328. .ui.dropdown .menu > .item > img {
  329. margin-top: -0.25rem;
  330. margin-bottom: -0.25rem;
  331. }
  332. .ui.dropdown .menu > .item > svg {
  333. margin-right: .78rem; /* use the same margin as for <img> */
  334. }
  335. .ui.selection.dropdown .menu > .item {
  336. border-color: var(--color-secondary);
  337. }
  338. .ui.selection.visible.dropdown > .text:not(.default) {
  339. color: var(--color-text);
  340. }
  341. .ui.dropdown.selected,
  342. .ui.dropdown .menu .selected.item {
  343. color: var(--color-text);
  344. background: var(--color-hover);
  345. }
  346. .ui.dropdown .menu > .message:not(.ui) {
  347. color: var(--color-text-light-2);
  348. }
  349. /* extend fomantic style '.ui.dropdown > .text > img' to include svg.img */
  350. .ui.dropdown > .text > .img {
  351. margin-left: 0;
  352. float: none;
  353. margin-right: 0.78571429rem;
  354. }
  355. .ui.dropdown > .text > .description,
  356. .ui.dropdown .menu > .item > .description {
  357. color: var(--color-text-light-2);
  358. }
  359. /* styles from removed fomantic transition module */
  360. .hidden.transition {
  361. visibility: hidden;
  362. display: none;
  363. }
  364. .visible.transition {
  365. display: block !important;
  366. visibility: visible !important;
  367. }
  368. .ui.selection.active.dropdown,
  369. .ui.selection.active.dropdown:hover,
  370. .ui.selection.active.dropdown .menu,
  371. .ui.selection.active.dropdown:hover .menu {
  372. border-color: var(--color-primary);
  373. }
  374. .ui.pointing.dropdown > .menu:not(.hidden)::after {
  375. background: var(--color-menu);
  376. box-shadow: -1px -1px 0 0 var(--color-secondary);
  377. }
  378. .ui.pointing.upward.dropdown .menu::after,
  379. .ui.top.pointing.upward.dropdown .menu::after {
  380. box-shadow: 1px 1px 0 0 var(--color-secondary);
  381. }
  382. .ui.comments .comment .text {
  383. margin: 0;
  384. }
  385. .ui.comments .comment .text,
  386. .ui.comments .comment .author {
  387. color: var(--color-text);
  388. }
  389. .ui.comments .comment a.author:hover {
  390. color: var(--color-primary);
  391. }
  392. .ui.comments .comment .metadata {
  393. color: var(--color-text-light-2);
  394. }
  395. img.ui.avatar,
  396. .ui.avatar img,
  397. .ui.avatar svg {
  398. border-radius: var(--border-radius);
  399. object-fit: contain;
  400. aspect-ratio: 1;
  401. }
  402. .ui.error.message .header,
  403. .ui.warning.message .header {
  404. color: inherit;
  405. filter: saturate(2);
  406. }
  407. .full.height {
  408. flex-grow: 1;
  409. padding-bottom: var(--page-space-bottom);
  410. }
  411. .status-page-error {
  412. margin-top: max(45vh - 90px, 80px);
  413. margin-bottom: 80px;
  414. }
  415. .status-page-error-title {
  416. font-size: 48px;
  417. margin-bottom: 14px; /* some elements below may use tw-my-4 or tw-my-8, so use 14px as a minimal margin */
  418. line-height: initial;
  419. text-align: center;
  420. font-weight: var(--font-weight-bold);
  421. color: var(--color-text-light-2);
  422. }
  423. /* add margin below .secondary nav when it is the first child */
  424. .page-content > :first-child.secondary-nav {
  425. margin-bottom: 14px;
  426. }
  427. /* add margin to all pages when there is no .secondary.nav */
  428. .page-content > :first-child:not(.secondary-nav) {
  429. margin-top: var(--page-spacing);
  430. }
  431. /* if .ui.grid is the first child the first grid-column has 'padding-top: 1rem' which we need
  432. to compensate here */
  433. .page-content > :first-child.ui.grid {
  434. margin-top: calc(var(--page-spacing) - 1rem);
  435. }
  436. .text.primary {
  437. color: var(--color-primary) !important;
  438. }
  439. .text.red {
  440. color: var(--color-red) !important;
  441. }
  442. .text.orange {
  443. color: var(--color-orange) !important;
  444. }
  445. .text.yellow {
  446. color: var(--color-yellow) !important;
  447. }
  448. .text.green {
  449. color: var(--color-green) !important;
  450. }
  451. .text.blue {
  452. color: var(--color-blue) !important;
  453. }
  454. .text.purple {
  455. color: var(--color-purple) !important;
  456. }
  457. .text.black {
  458. color: var(--color-text) !important;
  459. }
  460. .text.grey {
  461. color: var(--color-text-light) !important;
  462. }
  463. .text.light {
  464. color: var(--color-text-light) !important;
  465. }
  466. .text.light-2 {
  467. color: var(--color-text-light-2) !important;
  468. }
  469. .text.light-3 {
  470. color: var(--color-text-light-3) !important;
  471. }
  472. .text.light.grey {
  473. color: var(--color-grey-light) !important;
  474. }
  475. .text.gold {
  476. color: var(--color-gold) !important;
  477. }
  478. .text.small {
  479. font-size: 0.75em;
  480. }
  481. /* popover box shadows */
  482. .ui.dropdown .menu,
  483. .ui.upward.dropdown > .menu,
  484. .ui.menu .dropdown.item .menu,
  485. .ui.selection.active.dropdown .menu,
  486. .ui.upward.selection.dropdown .menu,
  487. .ui.selection.active.dropdown:hover .menu,
  488. .ui.upward.active.selection.dropdown:hover .menu {
  489. box-shadow: 0 6px 18px var(--color-shadow);
  490. }
  491. .ui.floating.dropdown .menu {
  492. box-shadow: 0 6px 18px var(--color-shadow) !important;
  493. }
  494. .ui .text.truncate {
  495. overflow-x: hidden;
  496. text-overflow: ellipsis;
  497. white-space: nowrap;
  498. display: inline-block;
  499. }
  500. .ui .message.flash-message {
  501. text-align: center;
  502. }
  503. .ui .message > ul {
  504. margin: 0;
  505. padding: 0 1em;
  506. }
  507. .ui .header > i + .content {
  508. padding-left: 0.75rem;
  509. vertical-align: middle;
  510. }
  511. .ui .sha.label {
  512. font-family: var(--fonts-monospace);
  513. font-size: 13px;
  514. font-weight: var(--font-weight-normal);
  515. padding: 3px 5px;
  516. flex-shrink: 0;
  517. }
  518. .ui .button.truncate {
  519. display: inline-block;
  520. max-width: 100%;
  521. overflow: hidden;
  522. text-overflow: ellipsis;
  523. vertical-align: top;
  524. white-space: nowrap;
  525. margin-right: 6px;
  526. }
  527. .ui.status.buttons .svg {
  528. margin-right: 4px;
  529. }
  530. .ui.inline.delete-button {
  531. padding: 8px 15px;
  532. font-weight: var(--font-weight-normal);
  533. }
  534. .ui .migrate {
  535. color: var(--color-text-light-2) !important;
  536. }
  537. .ui .migrate a {
  538. color: var(--color-text-light) !important;
  539. }
  540. .ui .migrate a:hover {
  541. color: var(--color-text) !important;
  542. }
  543. .ui .border {
  544. border: 1px solid;
  545. }
  546. .ui.dropdown .menu.context-user-switch .scrolling.menu {
  547. border-radius: 0 !important;
  548. box-shadow: none !important;
  549. border-bottom: 1px solid var(--color-secondary);
  550. max-width: 80vw;
  551. }
  552. .user-menu > .item {
  553. width: 100%;
  554. border-radius: 0 !important;
  555. }
  556. .scrolling.menu .item.selected {
  557. font-weight: var(--font-weight-semibold) !important;
  558. }
  559. .ui.dropdown .scrolling.menu {
  560. border-color: var(--color-secondary);
  561. border-radius: 0 0 var(--border-radius) var(--border-radius) !important;
  562. }
  563. .color-preview {
  564. display: inline-block;
  565. margin-left: 0.4em;
  566. height: 0.67em;
  567. width: 0.67em;
  568. border-radius: var(--border-radius);
  569. }
  570. .attention-icon {
  571. margin: 2px 6px 0 0;
  572. }
  573. blockquote.attention-note {
  574. border-left-color: var(--color-blue-dark-1);
  575. }
  576. strong.attention-note, svg.attention-note {
  577. color: var(--color-blue-dark-1);
  578. }
  579. blockquote.attention-tip {
  580. border-left-color: var(--color-success-text);
  581. }
  582. strong.attention-tip, svg.attention-tip {
  583. color: var(--color-success-text);
  584. }
  585. blockquote.attention-important {
  586. border-left-color: var(--color-violet-dark-1);
  587. }
  588. strong.attention-important, svg.attention-important {
  589. color: var(--color-violet-dark-1);
  590. }
  591. blockquote.attention-warning {
  592. border-left-color: var(--color-warning-text);
  593. }
  594. strong.attention-warning, svg.attention-warning {
  595. color: var(--color-warning-text);
  596. }
  597. blockquote.attention-caution {
  598. border-left-color: var(--color-red-dark-1);
  599. }
  600. strong.attention-caution, svg.attention-caution {
  601. color: var(--color-red-dark-1);
  602. }
  603. /* FIXME: this is a longstanding dirty patch since 2015, it only makes the pages more messy and shouldn't be used */
  604. .center {
  605. text-align: center;
  606. }
  607. overflow-menu {
  608. border-bottom: 1px solid var(--color-secondary) !important;
  609. display: flex;
  610. }
  611. overflow-menu .overflow-menu-items {
  612. display: flex;
  613. flex: 1;
  614. }
  615. overflow-menu .overflow-menu-items .item {
  616. margin-bottom: 0 !important; /* reset fomantic's margin, because the active menu has special bottom border */
  617. }
  618. overflow-menu .overflow-menu-items .item-flex-space {
  619. flex: 1;
  620. }
  621. overflow-menu .overflow-menu-button {
  622. background: transparent;
  623. border: none;
  624. color: inherit;
  625. text-align: center;
  626. width: 32px;
  627. padding: 0;
  628. }
  629. /* match the styles of ".ui.secondary.pointing.menu .active.item" */
  630. overflow-menu.ui.secondary.pointing.menu .overflow-menu-button.active {
  631. padding: 2px 0 0;
  632. border-bottom: 2px solid currentcolor;
  633. background-color: transparent;
  634. font-weight: var(--font-weight-medium);
  635. }
  636. overflow-menu .overflow-menu-button:hover {
  637. color: var(--color-text-dark);
  638. }
  639. overflow-menu .ui.label {
  640. margin-left: 7px !important; /* save some space */
  641. }
  642. .activity-bar-graph {
  643. background-color: var(--color-primary);
  644. color: var(--color-primary-contrast);
  645. }
  646. .activity-bar-graph-alt {
  647. color: var(--color-primary-contrast);
  648. }
  649. .archived-icon {
  650. color: var(--color-secondary-dark-2) !important;
  651. }
  652. .oauth2-authorize-application-box {
  653. margin-top: 3em !important;
  654. }
  655. .lines-blame-btn {
  656. padding: 0 0 0 5px;
  657. display: flex;
  658. justify-content: center;
  659. }
  660. .lines-num {
  661. padding: 0 8px;
  662. text-align: right !important;
  663. color: var(--color-text-light-2);
  664. width: 1%; /* this apparently needs to be a percentage so that code column stretches in diffs */
  665. min-width: 72px;
  666. white-space: nowrap;
  667. }
  668. .code-diff .lines-num {
  669. min-width: 50px;
  670. }
  671. .lines-num span.bottom-line::after {
  672. border-bottom: 1px solid var(--color-secondary);
  673. }
  674. .lines-num span::after {
  675. content: attr(data-line-number);
  676. line-height: 20px !important;
  677. padding: 0 10px;
  678. display: block;
  679. }
  680. .lines-type-marker {
  681. vertical-align: top;
  682. white-space: nowrap;
  683. }
  684. .lines-num,
  685. .lines-code {
  686. font-size: 12px;
  687. font-family: var(--fonts-monospace);
  688. line-height: 20px;
  689. padding-top: 0;
  690. padding-bottom: 0;
  691. vertical-align: top;
  692. }
  693. .lines-num pre,
  694. .lines-code pre,
  695. .lines-num ol,
  696. .lines-code ol {
  697. background-color: inherit;
  698. margin: 0;
  699. padding: 0 !important;
  700. }
  701. .lines-num pre li,
  702. .lines-code pre li,
  703. .lines-num ol li,
  704. .lines-code ol li {
  705. display: block;
  706. width: calc(100% - 1ch);
  707. padding-left: 1ch;
  708. }
  709. .lines-escape {
  710. width: 0;
  711. white-space: nowrap;
  712. padding: 0;
  713. }
  714. .lines-code {
  715. padding-left: 5px;
  716. }
  717. .code-inner {
  718. font: 12px var(--fonts-monospace);
  719. white-space: pre-wrap;
  720. overflow-wrap: anywhere;
  721. line-height: inherit; /* needed for inline code preview in markup */
  722. }
  723. .blame .code-inner {
  724. white-space: pre-wrap;
  725. overflow-wrap: anywhere;
  726. }
  727. .lines-commit {
  728. vertical-align: top;
  729. color: var(--color-text-light-1);
  730. padding: 0 !important;
  731. width: 1%;
  732. }
  733. .lines-commit .blame-info {
  734. width: min(26vw, 300px);
  735. display: block;
  736. padding: 0 0 0 6px;
  737. line-height: 20px;
  738. box-sizing: content-box;
  739. }
  740. .lines-commit .blame-info .blame-data {
  741. display: flex;
  742. font-family: var(--fonts-regular);
  743. }
  744. .lines-commit .blame-info .blame-data .blame-message {
  745. flex-grow: 2;
  746. overflow: hidden;
  747. white-space: nowrap;
  748. text-overflow: ellipsis;
  749. }
  750. .lines-commit .blame-info .blame-data .blame-time,
  751. .lines-commit .blame-info .blame-data .blame-avatar {
  752. flex-shrink: 0;
  753. }
  754. .blame-avatar {
  755. display: flex;
  756. align-items: center;
  757. margin-right: 4px;
  758. }
  759. tr.top-line-blame {
  760. border-top: 1px solid var(--color-secondary);
  761. }
  762. tr.top-line-blame:first-of-type {
  763. border-top: none; /* merge code lines belonging to the same commit into one block */
  764. }
  765. .lines-code .bottom-line,
  766. .lines-commit .bottom-line {
  767. border-bottom: 1px solid var(--color-secondary);
  768. }
  769. .migrate .svg.gitea-git {
  770. color: var(--color-git);
  771. }
  772. .color-icon {
  773. display: inline-block;
  774. border-radius: var(--border-radius-full);
  775. height: 14px;
  776. width: 14px;
  777. }
  778. .rss-icon {
  779. display: inline-flex;
  780. color: var(--color-text-light-1);
  781. }
  782. table th[data-sortt-asc]:hover,
  783. table th[data-sortt-desc]:hover {
  784. background: var(--color-hover) !important;
  785. cursor: pointer !important;
  786. }
  787. table th[data-sortt-asc] .svg,
  788. table th[data-sortt-desc] .svg {
  789. margin-left: 0.25rem;
  790. }
  791. .ui.dropdown .menu .item {
  792. border-radius: 0;
  793. }
  794. .ui.dropdown .menu .item:first-of-type {
  795. border-radius: var(--border-radius) var(--border-radius) 0 0;
  796. }
  797. .ui.dropdown .menu .item:last-of-type {
  798. border-radius: 0 0 var(--border-radius) var(--border-radius);
  799. }
  800. .ui.multiple.dropdown > .label {
  801. box-shadow: 0 0 0 1px var(--color-secondary) inset;
  802. }
  803. /* for "image" emojis like ":git:" ":gitea:" and ":github:" (see CUSTOM_EMOJIS config option) */
  804. .emoji img {
  805. border-width: 0 !important;
  806. margin: 0 !important;
  807. width: 1em !important;
  808. height: 1em !important;
  809. vertical-align: -0.15em;
  810. }
  811. .ui.tabular.menu .item,
  812. .ui.secondary.pointing.menu .item {
  813. padding: 11.55px 12px !important; /* match .dashboard-navbar in height */
  814. color: var(--color-text-light-2);
  815. }
  816. .ui.tabular.menu .item:hover,
  817. .ui.secondary.pointing.menu a.item:hover {
  818. color: var(--color-text);
  819. }
  820. .ui.tabular.menu .active.item,
  821. .ui.secondary.pointing.menu .active.item,
  822. .resize-for-semibold::before {
  823. font-weight: var(--font-weight-semibold);
  824. }
  825. .resize-for-semibold::before {
  826. content: attr(data-text);
  827. visibility: hidden;
  828. display: block;
  829. height: 0;
  830. }
  831. .flash-error details code,
  832. .flash-warning details code {
  833. display: block;
  834. text-align: left;
  835. }
  836. .ui.button.ellipsis-button {
  837. padding: 0 5px 8px;
  838. display: inline-block;
  839. font-weight: var(--font-weight-semibold);
  840. line-height: 8px;
  841. vertical-align: middle;
  842. min-height: 0;
  843. }
  844. .ui.dropdown:not(.button) {
  845. line-height: var(--line-height-default); /* the dropdown doesn't have default line-height, use this to make the dropdown icon align with plain dropdown */
  846. }
  847. /* dropdown has some kinds of icons:
  848. - "> .dropdown.icon": the arrow for opening the dropdown
  849. - "> .remove.icon": the "x" icon for clearing the dropdown, only used in selection dropdown
  850. - "> .ui.label > .delete.icon": the "x" icon for removing a label item in multiple selection dropdown
  851. */
  852. .ui.dropdown.mini.button,
  853. .ui.dropdown.tiny.button {
  854. padding-right: 20px;
  855. }
  856. .ui.dropdown.button {
  857. padding-right: 22px;
  858. }
  859. .ui.dropdown.large.button {
  860. padding-right: 24px;
  861. }
  862. /* Gitea uses SVG images instead of Fomantic builtin "<i>" font icons, so we need to reset the icon styles */
  863. .ui.ui.dropdown > .icon.icon {
  864. position: initial; /* plain dropdown and button dropdown use flex layout for icons */
  865. padding: 0;
  866. margin: 0;
  867. height: auto;
  868. }
  869. .ui.ui.dropdown > .icon.icon:hover {
  870. opacity: 1;
  871. }
  872. .ui.ui.button.dropdown > .icon.icon,
  873. .ui.ui.selection.dropdown > .icon.icon {
  874. position: absolute; /* selection dropdown uses absolute layout for icons */
  875. top: 50%;
  876. transform: translateY(-50%);
  877. }
  878. .ui.ui.dropdown > .dropdown.icon {
  879. right: 0.5em;
  880. }
  881. .ui.ui.dropdown > .remove.icon {
  882. right: 2em;
  883. }
  884. .btn,
  885. .ui.ui.button,
  886. .ui.ui.dropdown,
  887. .flex-text-inline,
  888. .flex-text-inline > a,
  889. .flex-text-inline > span {
  890. display: inline-flex;
  891. align-items: center;
  892. gap: var(--gap-inline);
  893. vertical-align: middle;
  894. min-width: 0; /* make ellipsis work */
  895. }
  896. .ui.multiple.selection.dropdown {
  897. flex-wrap: wrap;
  898. }
  899. .ui.ui.dropdown.selection {
  900. min-width: 14em; /* match the default min width */
  901. }
  902. .ui.dropdown .ui.label .svg {
  903. vertical-align: middle;
  904. }
  905. .ui.ui.labeled.button {
  906. gap: 0;
  907. align-items: stretch;
  908. }
  909. .ui.list.flex-items-block > .item,
  910. .ui.form .field > label.flex-text-block, /* override fomantic "block" style */
  911. .flex-items-block > .item,
  912. .flex-text-block {
  913. display: flex;
  914. align-items: center;
  915. gap: var(--gap-block);
  916. min-width: 0;
  917. }
  918. .ui.dropdown > .ui.button,
  919. .flex-text-block > .ui.button,
  920. .flex-text-inline > .ui.button {
  921. margin: 0; /* fomantic buttons have default margin, when we use them in a flex container with gap, we do not need these margins */
  922. }
  923. /* to override Fomantic's default display: block for ".menu .item", and use a slightly larger gap for menu item content
  924. the "!important" is necessary to override Fomantic UI menu item styles, meanwhile we should keep the "hidden" items still hidden */
  925. .ui.dropdown .menu.flex-items-menu > .item:not(.hidden, .filtered, .tw-hidden) {
  926. display: flex !important;
  927. align-items: center;
  928. gap: var(--gap-block);
  929. min-width: 0;
  930. }
  931. .ui.dropdown .menu.flex-items-menu > .item img,
  932. .ui.dropdown .menu.flex-items-menu > .item svg {
  933. margin: 0; /* use gap, but not margin */
  934. }
  935. .ui.dropdown.ellipsis-text-items {
  936. /* reset y padding and use the line-height below instead, to avoid the "overflow: hidden" clips the larger image in the "text" element */
  937. padding-top: 0;
  938. padding-bottom: 0;
  939. }
  940. .ui.dropdown.ellipsis-text-items > .text {
  941. overflow: hidden;
  942. white-space: nowrap;
  943. text-overflow: ellipsis;
  944. line-height: 2.71; /* matches fomantic dropdown's default min-height */
  945. }
  946. .ui.dropdown.ellipsis-text-items .menu > .item {
  947. white-space: nowrap !important;
  948. overflow: hidden !important;
  949. text-overflow: ellipsis !important;
  950. }
  951. .svg.octicon-file-directory-fill,
  952. .svg.octicon-file-directory-open-fill,
  953. .svg.octicon-file-submodule {
  954. color: var(--color-primary);
  955. }
  956. .svg.octicon-file,
  957. .svg.octicon-file-symlink-file,
  958. .svg.octicon-file-directory-symlink {
  959. color: var(--color-secondary-dark-7);
  960. }