gitea源码

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. .file-view tr.active .lines-num,
  2. .file-view tr.active .lines-escape,
  3. .file-view tr.active .lines-code {
  4. background: var(--color-highlight-bg);
  5. }
  6. /* set correct border radius on the last active lines, to avoid border overflow */
  7. .file-view tr.active:last-of-type .lines-code {
  8. border-bottom-right-radius: var(--border-radius);
  9. }
  10. .file-view tr.active .lines-num {
  11. position: relative;
  12. }
  13. /* add a darker "handler" at the beginning of the active line */
  14. .file-view tr.active .lines-num::before {
  15. content: "";
  16. position: absolute;
  17. left: 0;
  18. width: 2px;
  19. height: 100%;
  20. background: var(--color-highlight-fg);
  21. }
  22. .file-view .file-not-rendered-prompt {
  23. padding: 1rem;
  24. text-align: center;
  25. font-size: 1rem !important; /* use consistent styles for various containers (code, markup, etc) */
  26. line-height: var(--line-height-default) !important; /* same as above */
  27. }
  28. /* ".code-view" is always used with ".file-view", to show the code of a file */
  29. .file-view.code-view {
  30. background: var(--color-code-bg);
  31. border-radius: var(--border-radius);
  32. }
  33. .file-view.code-view table {
  34. width: 100%;
  35. }
  36. .file-view.code-view .lines-num span::after {
  37. cursor: pointer;
  38. }
  39. .file-view.code-view .lines-num:hover {
  40. color: var(--color-text-dark);
  41. }
  42. .file-view.code-view .ui.button.code-line-button {
  43. border: 1px solid var(--color-secondary);
  44. padding: 1px 4px;
  45. margin: 0;
  46. min-height: 0;
  47. position: absolute;
  48. left: 6px;
  49. }
  50. .file-view.code-view .ui.button.code-line-button:hover {
  51. background: var(--color-secondary);
  52. }
  53. .view-raw {
  54. display: flex;
  55. justify-content: center;
  56. }
  57. .view-raw > * {
  58. max-width: 100%;
  59. }
  60. .view-raw audio,
  61. .view-raw video,
  62. .view-raw img {
  63. margin: 1rem;
  64. border-radius: 0;
  65. object-fit: contain;
  66. }
  67. .view-raw img[src$=".svg" i] {
  68. max-height: 600px !important;
  69. max-width: 600px !important;
  70. }
  71. .file-view-render-container {
  72. width: 100%;
  73. }
  74. .file-view-render-container :last-child {
  75. border-radius: 0 0 var(--border-radius) var(--border-radius); /* to match the "ui segment" bottom radius */
  76. }