track-changes.less 5.2 KB

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