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.

_review.less 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. @import "variables.less";
  2. .ui.button.add-code-comment {
  3. padding: 2px;
  4. position: absolute;
  5. margin-left: -22px;
  6. z-index: 5;
  7. opacity: 0;
  8. transition: transform .1s ease-in-out;
  9. transform: scale(1);
  10. box-shadow: none !important;
  11. border: none !important;
  12. &:hover {
  13. transform: scale(1.1);
  14. }
  15. }
  16. .lines-escape a.toggle-escape-button::before {
  17. visibility: visible;
  18. content: '⚠️';
  19. font-family: var(--fonts-emoji);
  20. color: var(--color-red);
  21. }
  22. .repository .diff-file-box .code-diff td.lines-escape {
  23. padding-left: 0 !important;
  24. }
  25. .diff-file-box .lines-code:hover .ui.button.add-code-comment {
  26. opacity: 1;
  27. }
  28. .repository .diff-file-box .code-diff .add-comment-left,
  29. .repository .diff-file-box .code-diff .add-comment-right,
  30. .repository .diff-file-box .code-diff .add-code-comment .add-comment-left,
  31. .repository .diff-file-box .code-diff .add-code-comment .add-comment-right,
  32. .repository .diff-file-box .code-diff .add-code-comment .lines-type-marker {
  33. padding-left: 0 !important;
  34. padding-right: 0 !important;
  35. }
  36. .add-comment-left.add-comment-right .ui.attached.header {
  37. border: 1px solid var(--color-secondary);
  38. &:not(.top) {
  39. margin-bottom: .5em;
  40. }
  41. }
  42. .add-comment .lines-num,
  43. .add-comment .lines-escape,
  44. .add-comment .lines-type-marker {
  45. display: none;
  46. }
  47. .show-outdated,
  48. .hide-outdated {
  49. &:extend(.unselectable);
  50. &:hover {
  51. text-decoration: underline;
  52. }
  53. }
  54. .comment-code-cloud {
  55. padding: .5rem 1rem !important;
  56. position: relative;
  57. margin: 0 auto;
  58. max-width: 1000px;
  59. @media @mediaSm {
  60. max-width: none;
  61. padding: .75rem !important;
  62. .code-comment-buttons {
  63. margin: .5rem 0 .25rem !important;
  64. .code-comment-buttons-buttons {
  65. width: 100%;
  66. }
  67. }
  68. .ui.buttons {
  69. width: 100%;
  70. margin: 0 !important;
  71. .button {
  72. flex: 1;
  73. }
  74. }
  75. }
  76. .comments .comment {
  77. padding: 0;
  78. @media @mediaSm {
  79. display: flex;
  80. .comment-header-right.actions .ui.basic.label {
  81. display: none;
  82. }
  83. .avatar {
  84. width: auto;
  85. float: none;
  86. margin: 0 .5rem 0 0;
  87. flex-shrink: 0;
  88. ~ .content {
  89. margin-left: 1em;
  90. }
  91. }
  92. img.avatar {
  93. margin: 0 !important;
  94. }
  95. .comment-content {
  96. margin-left: 0 !important;
  97. }
  98. .comment-container {
  99. width: 100%;
  100. }
  101. &.code-comment {
  102. padding: 0 0 .5rem !important;
  103. }
  104. }
  105. }
  106. .attached {
  107. &.tab {
  108. border: 0;
  109. padding: 0;
  110. margin: 0;
  111. }
  112. &.header {
  113. padding: .1rem 1rem;
  114. .text {
  115. margin: 0;
  116. }
  117. }
  118. }
  119. .right.menu.options .item {
  120. padding: .85714286em .442857em;
  121. cursor: pointer;
  122. }
  123. .ui.active.tab {
  124. padding: .5em;
  125. &.markup {
  126. padding: 1em;
  127. min-height: 168px;
  128. }
  129. }
  130. .ui.tabular.menu {
  131. margin: .5em;
  132. }
  133. .footer {
  134. border-top: 1px solid var(--color-secondary);
  135. padding: 10px 0;
  136. .markup-info {
  137. display: inline-block;
  138. margin: 5px 0;
  139. font-size: 12px;
  140. color: var(--color-text-light);
  141. }
  142. .ui.right.floated {
  143. padding-top: 6px;
  144. }
  145. &::after {
  146. clear: both;
  147. content: "";
  148. display: block;
  149. }
  150. }
  151. @media @mediaSm {
  152. .button {
  153. width: 100%;
  154. margin: 0 !important;
  155. margin-bottom: .75rem !important;
  156. }
  157. }
  158. }
  159. .diff-file-body .comment-form {
  160. margin: 0 0 0 3em;
  161. }
  162. .file-comment {
  163. color: var(--color-text);
  164. }
  165. a.blob-excerpt {
  166. color: var(--color-text-light);
  167. height: 28px;
  168. display: flex;
  169. justify-content: center;
  170. align-items: center;
  171. width: 100%;
  172. background: var(--color-expand-button);
  173. }
  174. a.blob-excerpt:hover {
  175. background: var(--color-primary);
  176. color: var(--color-primary-contrast);
  177. }
  178. // See the comment of createCommentEasyMDE() for the review editor
  179. // EasyMDE's options can not handle minHeight & maxHeight together correctly, we have to set minHeight in JS code
  180. .review-box-panel .CodeMirror-scroll {
  181. min-height: 80px;
  182. max-height: calc(100vh - 360px);
  183. }
  184. @media @mediaSm {
  185. .review-box-panel .CodeMirror-scroll {
  186. max-width: calc(100vw - 70px);
  187. }
  188. }
  189. @media @mediaMd {
  190. .review-box-panel .CodeMirror-scroll {
  191. max-width: 700px;
  192. }
  193. }
  194. @media @mediaLg {
  195. .review-box-panel .CodeMirror-scroll {
  196. max-width: 800px;
  197. }
  198. }
  199. @media @mediaXl {
  200. .review-box-panel .CodeMirror-scroll {
  201. max-width: 900px;
  202. }
  203. }
  204. #review-box {
  205. position: relative;
  206. }
  207. .review-box-panel {
  208. position: absolute;
  209. min-width: max-content;
  210. top: 45px;
  211. right: -5px;
  212. z-index: 2;
  213. }
  214. #review-box .review-comments-counter {
  215. background-color: var(--color-primary-light-4);
  216. color: var(--color-primary-contrast);
  217. }
  218. #review-box:hover .review-comments-counter {
  219. background-color: var(--color-primary-light-5);
  220. }
  221. #review-box .review-comments-counter[data-pending-comment-number="0"] {
  222. display: none;
  223. }
  224. .pull.files.diff [id] {
  225. scroll-margin-top: 99px;
  226. @media @mediaMdAndDown {
  227. scroll-margin-top: 130px;
  228. }
  229. }
  230. .changed-since-last-review {
  231. border: 1px var(--color-accent) solid;
  232. background-color: var(--color-small-accent);
  233. border-radius: 15px;
  234. padding: 4px 8px;
  235. margin: -8px 0; // just like other buttons in the diff box header
  236. font-size: .857rem; // just like .ui.tiny.button
  237. }
  238. .viewed-file-form {
  239. display: flex;
  240. align-items: center;
  241. border: 1px solid transparent;
  242. padding: 4px 8px;
  243. margin: -8px 0; // just like other buttons in the diff box header
  244. border-radius: .285rem; // just like .ui.tiny.button
  245. font-size: .857rem; // just like .ui.tiny.button
  246. }
  247. .viewed-file-form input {
  248. margin-right: 4px;
  249. }
  250. .viewed-file-checked-form {
  251. background-color: var(--color-small-accent);
  252. border-color: var(--color-accent);
  253. }
  254. #viewed-files-summary {
  255. width: 72px;
  256. height: 10px;
  257. }
  258. .diff-file-box {
  259. border-radius: .285rem; // Just like ui.top.attached.header
  260. }
  261. .diff-file-box:target {
  262. box-shadow: 0 0 0 3px var(--color-accent);
  263. }