history-v2.less 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. .history-toolbar {
  2. display: flex;
  3. align-items: center;
  4. position: absolute;
  5. width: 100%;
  6. top: @ide-body-top-offset;
  7. height: @editor-toolbar-height;
  8. line-height: 1;
  9. font-size: @font-size-small;
  10. background-color: @history-toolbar-bg-color;
  11. color: @history-toolbar-color;
  12. padding-left: (@line-height-computed / 2);
  13. }
  14. .history-compare-mode-toolbar {
  15. display: flex;
  16. flex-direction: column;
  17. align-items: stretch;
  18. justify-content: center;
  19. line-height: 1;
  20. font-size: @font-size-small;
  21. background-color: @history-toolbar-bg-color;
  22. height: @editor-toolbar-height;
  23. color: @history-toolbar-color;
  24. padding: 0 10px;
  25. }
  26. .history-toolbar when (@is-overleaf-light) {
  27. border-bottom: @toolbar-border-bottom;
  28. }
  29. .history-toolbar-selected-version {
  30. white-space: nowrap;
  31. overflow: hidden;
  32. text-overflow: ellipsis;
  33. margin-right: (@line-height-computed / 2);
  34. }
  35. .history-toolbar-time,
  36. .history-toolbar-selected-label {
  37. font-weight: bold;
  38. }
  39. .history-toolbar-actions {
  40. flex-grow: 1;
  41. flex-shrink: 0;
  42. }
  43. .history-toolbar-btn,
  44. .history-toolbar-btn-danger {
  45. .btn;
  46. .btn-xs;
  47. padding-left: @padding-small-horizontal;
  48. padding-right: @padding-small-horizontal;
  49. margin-right: (@line-height-computed / 2);
  50. }
  51. .history-toolbar-btn {
  52. .btn-info;
  53. }
  54. .history-toolbar-btn-danger {
  55. .btn-danger;
  56. }
  57. .history-toolbar-entries-list {
  58. flex: 0 0 @changesListWidth;
  59. padding: 0 10px;
  60. border-left: 1px solid @editor-border-color;
  61. display: flex;
  62. justify-content: center;
  63. }
  64. .history-entries {
  65. font-size: @history-base-font-size;
  66. color: @history-base-color;
  67. height: 100%;
  68. background-color: @history-base-bg;
  69. position: relative;
  70. &.history-entries-dragging {
  71. cursor: row-resize;
  72. }
  73. }
  74. .history-entry-day {
  75. display: block;
  76. background-color: @history-entry-day-bg;
  77. color: @history-entry-day-color;
  78. padding: 5px 10px;
  79. line-height: 1;
  80. position: sticky;
  81. top: 0;
  82. }
  83. .history-entry-toV-handle,
  84. .history-entry-fromV-handle {
  85. position: absolute;
  86. background-color: @history-entry-handle-bg;
  87. height: @history-entry-handle-height;
  88. top: 0;
  89. left: 0;
  90. right: 0;
  91. z-index: 2;
  92. cursor: row-resize;
  93. &.ui-draggable-dragging {
  94. opacity: 0;
  95. }
  96. &::after {
  97. content: '\00b7\00b7\00b7\00b7';
  98. position: absolute;
  99. text-align: center;
  100. -webkit-font-smoothing: antialiased;
  101. width: 100%;
  102. font-size: 20px;
  103. color: #fff;
  104. height: @history-entry-handle-height;
  105. line-height: @history-entry-handle-height / 2;
  106. }
  107. }
  108. .history-entry-fromV-handle {
  109. top: auto;
  110. bottom: 0;
  111. }
  112. .history-entry-details {
  113. position: relative;
  114. background-color: #fff;
  115. border-bottom: solid 2px @history-base-bg;
  116. padding: 5px 10px;
  117. cursor: pointer;
  118. }
  119. .history-version-with-label {
  120. .history-entry-details;
  121. padding: 7px 10px;
  122. }
  123. .history-entry-selected .history-entry-details,
  124. .history-version-with-label-selected & {
  125. background-color: @history-entry-selected-bg;
  126. color: #fff;
  127. }
  128. .history-entry-hover-selected .history-entry-details,
  129. .history-entry-hover-selected.history-entry-selected .history-entry-details,
  130. .history-version-with-label-hover-selected &,
  131. .history-version-with-label-hover-selected.history-entry-selected & {
  132. background-color: tint(@history-entry-selected-bg, 20%);
  133. color: #fff;
  134. }
  135. .history-entry-selected-to .history-entry-details,
  136. .history-entry-hover-selected-to .history-entry-details,
  137. .history-version-with-label-selected-to &,
  138. .history-version-with-label-hover-selected-to & {
  139. padding-top: @history-entry-handle-height + 5px;
  140. }
  141. .history-entry-selected-from .history-entry-details,
  142. .history-entry-hover-selected-from .history-entry-details,
  143. .history-version-with-label-selected-from &,
  144. .history-version-with-label-hover-selected-from & {
  145. padding-bottom: @history-entry-handle-height + 5px;
  146. }
  147. .history-label {
  148. display: inline-block;
  149. color: @history-entry-label-color;
  150. font-size: @font-size-small;
  151. margin-bottom: 3px;
  152. margin-right: 10px;
  153. white-space: nowrap;
  154. .history-entry-selected &,
  155. .history-entry-hover-selected &,
  156. .history-version-with-label-selected &,
  157. .history-version-with-label-hover-selected & {
  158. color: @history-entry-selected-label-color;
  159. }
  160. &.history-label-pseudo-current-state {
  161. .history-entry-selected &,
  162. .history-entry-hover-selected &,
  163. .history-version-with-label-selected &,
  164. .history-version-with-label-hover-selected & {
  165. color: @history-entry-selected-pseudo-label-color;
  166. }
  167. }
  168. }
  169. .history-label-comment,
  170. .history-label-delete-btn {
  171. padding: 0 @padding-xs-horizontal 1px @padding-xs-horizontal;
  172. border: 0;
  173. background-color: @history-entry-label-bg-color;
  174. .history-label-pseudo-current-state & {
  175. background-color: @history-entry-pseudo-label-bg-color;
  176. }
  177. .history-entry-selected &,
  178. .history-entry-hover-selected &,
  179. .history-version-with-label-selected &,
  180. .history-version-with-label-hover-selected & {
  181. background-color: @history-entry-selected-label-bg-color;
  182. }
  183. }
  184. .history-label-comment {
  185. display: block;
  186. float: left;
  187. border-radius: 9999px;
  188. max-width: 190px;
  189. overflow: hidden;
  190. text-overflow: ellipsis;
  191. .history-label-own & {
  192. padding-right: (@padding-xs-horizontal / 2);
  193. border-radius: 9999px 0 0 9999px;
  194. }
  195. }
  196. .history-label-delete-btn {
  197. padding-left: (@padding-xs-horizontal / 2);
  198. padding-right: @padding-xs-horizontal;
  199. border-radius: 0 9999px 9999px 0;
  200. &:hover {
  201. background-color: darken(@history-entry-label-bg-color, 8%);
  202. .history-entry-selected &,
  203. .history-entry-hover-selected &,
  204. .history-version-with-label-selected &,
  205. .history-version-with-label-hover-selected & {
  206. background-color: darken(@history-entry-selected-label-bg-color, 8%);
  207. }
  208. }
  209. }
  210. .history-label-tooltip {
  211. white-space: normal;
  212. padding: (@line-height-computed / 4);
  213. text-align: left;
  214. }
  215. .history-label-tooltip-title,
  216. .history-label-tooltip-owner,
  217. .history-label-tooltip-datetime {
  218. margin: 0 0 (@line-height-computed / 4) 0;
  219. }
  220. .history-label-tooltip-title {
  221. font-weight: bold;
  222. }
  223. .history-label-tooltip-datetime {
  224. margin-bottom: 0;
  225. }
  226. .history-entry-changes {
  227. .list-unstyled;
  228. margin-bottom: 3px;
  229. }
  230. .history-entry-change {
  231. word-break: break-all;
  232. }
  233. .history-entry-change-action {
  234. margin-right: 0.5em;
  235. }
  236. .history-entry-change-doc {
  237. color: @history-highlight-color;
  238. font-weight: bold;
  239. .history-entry-selected &,
  240. .history-entry-hover-selected &,
  241. .history-version-with-label-selected & {
  242. color: #fff;
  243. }
  244. }
  245. .history-entry-metadata {
  246. }
  247. .history-entry-metadata-time {
  248. white-space: nowrap;
  249. }
  250. .history-entry-metadata-users {
  251. display: inline;
  252. padding: 0;
  253. margin-right: 0.5em;
  254. }
  255. .history-entry-metadata-user {
  256. display: inline;
  257. &::after {
  258. content: ', ';
  259. }
  260. &:last-of-type::after {
  261. content: none;
  262. }
  263. }
  264. .history-entries-list-upgrade-prompt {
  265. background-color: #fff;
  266. margin-bottom: 2px;
  267. padding: 5px 10px;
  268. .change-list-compare & {
  269. font-size: @font-size-small;
  270. }
  271. }
  272. .history-labels-list,
  273. .history-labels-list-compare {
  274. .history-entries;
  275. overflow-y: auto;
  276. }
  277. .history-labels-list-compare {
  278. background-color: transparent;
  279. }
  280. .history-file-tree-inner {
  281. .full-size;
  282. overflow-y: auto;
  283. background-color: @file-tree-bg;
  284. .loading {
  285. color: #fff;
  286. font-size: @history-base-font-size;
  287. text-align: center;
  288. font-family: @font-family-serif;
  289. }
  290. }
  291. .tooltip-history-file-tree {
  292. font-size: 12px;
  293. .tooltip-inner {
  294. max-width: 400px;
  295. text-align: left;
  296. }
  297. }
  298. .history-file-entity-wrapper {
  299. color: #fff;
  300. margin-left: (@line-height-computed / 2);
  301. }
  302. .history-file-entity-link {
  303. display: block;
  304. position: relative;
  305. color: @file-tree-item-color;
  306. line-height: @file-tree-line-height;
  307. &:hover {
  308. .fake-full-width-bg(@file-tree-item-hover-bg);
  309. background-color: @file-tree-item-hover-bg;
  310. color: @file-tree-item-color;
  311. text-decoration: none;
  312. }
  313. &:focus {
  314. color: @file-tree-item-focus-color;
  315. outline: none;
  316. text-decoration: none;
  317. }
  318. }
  319. .history-file-entity-link-selected {
  320. background-color: @file-tree-item-selected-bg;
  321. font-weight: bold;
  322. color: #fff;
  323. .fake-full-width-bg(@file-tree-item-selected-bg);
  324. &:hover,
  325. &:focus {
  326. background-color: @file-tree-item-selected-bg;
  327. .fake-full-width-bg(@file-tree-item-selected-bg);
  328. color: #fff;
  329. pointer-events: none;
  330. }
  331. }
  332. .history-file-entity-name-container {
  333. display: flex;
  334. align-items: center;
  335. }
  336. .history-file-entity-name {
  337. flex: 0 1 auto;
  338. white-space: nowrap;
  339. overflow: hidden;
  340. text-overflow: ellipsis;
  341. }
  342. .history-file-entity-operation-badge {
  343. flex: 0 0 auto;
  344. text-transform: lowercase;
  345. margin-left: 0.5em;
  346. font-size: 0.7em;
  347. background: @history-file-badge-bg;
  348. color: @history-file-badge-color;
  349. border-radius: 8px;
  350. line-height: 1;
  351. padding: 2px 4px 3px;
  352. margin-top: 2px;
  353. }
  354. .history-file-entity-icon,
  355. .history-file-operation-icon {
  356. flex: 0 0 auto;
  357. color: @file-tree-item-icon-color;
  358. font-size: 14px;
  359. margin-right: 0.5em;
  360. .history-file-entity-link-selected & {
  361. color: #fff;
  362. }
  363. }
  364. .history-file-operation-icon {
  365. margin-left: 0.5em;
  366. margin-right: 0;
  367. }
  368. .history-file-entity-name-edited,
  369. .history-file-entity-name-added,
  370. .history-file-entity-name-removed,
  371. .history-file-entity-name-renamed {
  372. }
  373. .history-file-entity-name-removed {
  374. text-decoration: line-through;
  375. }