history-v2.less 9.1 KB

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