history.less 7.4 KB

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