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.7KB

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