track-changes.less 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. @changesListWidth: 250px;
  2. @changesListPadding: @line-height-computed / 2;
  3. @selector-padding-vertical: 10px;
  4. @selector-padding-horizontal: @line-height-computed / 2;
  5. @day-header-height: 24px;
  6. @range-bar-color: @link-color;
  7. @range-bar-selected-offset: 14px;
  8. #trackChanges {
  9. .upgrade-prompt {
  10. position: absolute;
  11. top: 0;
  12. bottom: 0;
  13. left: 0;
  14. right: 0;
  15. z-index: 100;
  16. background-color: rgba(128,128,128,0.4);
  17. .message {
  18. margin: auto;
  19. margin-top: 100px;
  20. padding: (@line-height-computed / 2) @line-height-computed;
  21. width: 400px;
  22. background-color: white;
  23. border-radius: 8px;
  24. }
  25. }
  26. .diff-panel {
  27. .full-size;
  28. margin-right: @changesListWidth;
  29. }
  30. .diff {
  31. .full-size;
  32. .toolbar {
  33. padding: 3px;
  34. .name {
  35. float: left;
  36. padding: 3px @line-height-computed / 4;
  37. display: inline-block;
  38. }
  39. }
  40. .diff-editor {
  41. .full-size;
  42. top: 40px;
  43. }
  44. .hide-ace-cursor {
  45. .ace_active-line, .ace_cursor-layer, .ace_gutter-active-line {
  46. display: none;
  47. }
  48. }
  49. .diff-deleted {
  50. padding: @line-height-computed;
  51. }
  52. }
  53. aside.change-list {
  54. border-left: 1px solid @toolbar-border-color;
  55. height: 100%;
  56. width: @changesListWidth;
  57. position: absolute;
  58. right: 0;
  59. .loading {
  60. text-align: center;
  61. font-family: @font-family-serif;
  62. }
  63. ul {
  64. li.change {
  65. position: relative;
  66. user-select: none;
  67. -ms-user-select: none;
  68. -moz-user-select: none;
  69. -webkit-user-select: none;
  70. .day {
  71. background-color: #fafafa;
  72. border-bottom: 1px solid @toolbar-border-color;
  73. padding: 4px;
  74. font-weight: bold;
  75. text-align: center;
  76. height: @day-header-height;
  77. font-size: 14px;
  78. line-height: 1;
  79. }
  80. .selectors {
  81. input {
  82. margin: 0;
  83. }
  84. position: absolute;
  85. left: @selector-padding-horizontal;
  86. top: 0;
  87. bottom: 0;
  88. width: 24px;
  89. .selector-from {
  90. position: absolute;
  91. bottom: @selector-padding-vertical;
  92. left: 0;
  93. opacity: 0.8;
  94. }
  95. .selector-to {
  96. position: absolute;
  97. top: @selector-padding-vertical;
  98. left: 0;
  99. opacity: 0.8;
  100. }
  101. .range {
  102. position: absolute;
  103. left: 5px;
  104. width: 4px;
  105. top: 0;
  106. bottom: 0;
  107. }
  108. }
  109. .description {
  110. padding: (@line-height-computed / 4);
  111. padding-left: 38px;
  112. min-height: 38px;
  113. border-bottom: 1px solid @toolbar-border-color;
  114. cursor: pointer;
  115. &:hover {
  116. background-color: @gray-lightest;
  117. }
  118. }
  119. .users {
  120. .user {
  121. font-size: 0.8rem;
  122. color: @gray;
  123. text-transform: capitalize;
  124. position: relative;
  125. padding-left: 16px;
  126. .color-square {
  127. height: 12px;
  128. width: 12px;
  129. border-radius: 3px;
  130. position: absolute;
  131. left: 0;
  132. bottom: 3px;
  133. }
  134. .name {
  135. width: 94%;
  136. white-space: nowrap;
  137. overflow: hidden;
  138. text-overflow: ellipsis;
  139. }
  140. }
  141. }
  142. .time {
  143. float: right;
  144. color: @gray;
  145. display: inline-block;
  146. padding-right: (@line-height-computed / 2);
  147. font-size: 0.8rem;
  148. line-height: @line-height-computed;
  149. }
  150. .docs {
  151. font-weight: bold;
  152. font-size: 0.9rem;
  153. }
  154. }
  155. li.loading-changes, li.empty-message {
  156. padding: 6px;
  157. cursor: default;
  158. &:hover {
  159. background-color: inherit;
  160. }
  161. }
  162. li.selected {
  163. border-left: 4px solid @range-bar-color;
  164. .day {
  165. padding-left: 0;
  166. }
  167. .description {
  168. padding-left: 34px;
  169. }
  170. .selectors {
  171. left: @selector-padding-horizontal - 4px;
  172. .range {
  173. background-color: @range-bar-color;
  174. }
  175. }
  176. }
  177. li.selected-to {
  178. .selectors {
  179. .range {
  180. top: @range-bar-selected-offset;
  181. }
  182. .selector-to {
  183. opacity: 1;
  184. }
  185. }
  186. }
  187. li.selected-from {
  188. .selectors {
  189. .range {
  190. bottom: @range-bar-selected-offset;
  191. }
  192. .selector-from {
  193. opacity: 1;
  194. }
  195. }
  196. }
  197. li.first-in-day {
  198. .selectors {
  199. .selector-to {
  200. top: @day-header-height + @selector-padding-vertical;
  201. }
  202. }
  203. }
  204. li.first-in-day.selected-to {
  205. .selectors {
  206. .range {
  207. top: @day-header-height + @range-bar-selected-offset;
  208. }
  209. }
  210. }
  211. }
  212. ul.hover-state {
  213. li {
  214. .selectors {
  215. .range {
  216. background-color: transparent;
  217. top: 0;
  218. bottom: 0;
  219. }
  220. }
  221. }
  222. li.hover-selected {
  223. .selectors {
  224. .range {
  225. top: 0;
  226. background-color: @gray-light;
  227. }
  228. }
  229. }
  230. li.hover-selected-to {
  231. .selectors {
  232. .range {
  233. top: @range-bar-selected-offset;
  234. }
  235. .selector-to {
  236. opacity: 1;
  237. }
  238. }
  239. }
  240. li.hover-selected-from {
  241. .selectors {
  242. .range {
  243. bottom: @range-bar-selected-offset;
  244. }
  245. .selector-from {
  246. opacity: 1;
  247. }
  248. }
  249. }
  250. li.first-in-day.hover-selected-to {
  251. .selectors {
  252. .range {
  253. top: @day-header-height + @range-bar-selected-offset;
  254. }
  255. }
  256. }
  257. }
  258. }
  259. }
  260. .editor-dark {
  261. #trackChanges {
  262. aside.change-list {
  263. border-color: @editor-dark-toolbar-border-color;
  264. ul li.change {
  265. .day {
  266. background-color: darken(@editor-dark-background-color, 10%);
  267. border-bottom: 1px solid @editor-dark-toolbar-border-color;
  268. }
  269. .description {
  270. border-bottom: 1px solid @editor-dark-toolbar-border-color;
  271. &:hover {
  272. background-color: black;
  273. }
  274. }
  275. }
  276. }
  277. }
  278. }