track-changes.less 6.4 KB

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