history-react.less 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. @versions-list-width: 320px;
  2. @history-toolbar-height: 40px;
  3. @history-change-list-padding: 16px;
  4. history-root {
  5. height: 100%;
  6. display: block;
  7. }
  8. .history-react {
  9. display: flex;
  10. height: 100%;
  11. background-color: @history-main-bg;
  12. .history-header {
  13. height: @history-toolbar-height;
  14. background-color: @history-react-header-bg;
  15. color: @history-react-header-color;
  16. font-size: @font-size-small;
  17. display: flex;
  18. flex-direction: column;
  19. justify-content: center;
  20. box-sizing: border-box;
  21. }
  22. .doc-panel {
  23. flex: 1;
  24. display: flex;
  25. flex-direction: column;
  26. .toolbar-container {
  27. border-bottom: 1px solid @history-react-separator-color;
  28. padding: 0 8px;
  29. }
  30. .doc-container {
  31. flex: 1;
  32. overflow-y: auto;
  33. }
  34. }
  35. .change-list {
  36. display: flex;
  37. flex-direction: column;
  38. width: @versions-list-width;
  39. font-size: @font-size-small;
  40. border-left: 1px solid @history-react-separator-color;
  41. box-sizing: content-box;
  42. }
  43. .toggle-switch-label {
  44. flex: 1;
  45. span {
  46. display: block;
  47. }
  48. }
  49. .history-version-list-container {
  50. flex: 1;
  51. overflow-y: auto;
  52. }
  53. .history-all-versions-scroller {
  54. overflow-y: auto;
  55. height: 100%;
  56. }
  57. .history-all-versions-container {
  58. position: relative;
  59. }
  60. .history-versions-bottom {
  61. position: absolute;
  62. height: 8em;
  63. bottom: 0;
  64. }
  65. .history-toggle-switch-container,
  66. .history-version-day,
  67. .history-version-details {
  68. padding: 0 @history-change-list-padding;
  69. }
  70. .history-version-day {
  71. position: sticky;
  72. z-index: 1;
  73. top: 0;
  74. display: block;
  75. padding-top: 12px;
  76. padding-bottom: 4px;
  77. line-height: 20px;
  78. }
  79. .history-version-details {
  80. padding-top: 8px;
  81. padding-bottom: 8px;
  82. position: relative;
  83. &.history-version-selectable {
  84. cursor: pointer;
  85. &:hover {
  86. background-color: @neutral-10;
  87. }
  88. }
  89. &.history-version-selected {
  90. background-color: @green-10;
  91. border-left: 3px solid @green-50;
  92. }
  93. &.history-version-selected.history-version-selectable:hover {
  94. background-color: fade(@green-70, 16%);
  95. border-left: 3px solid @green-50;
  96. }
  97. &.history-version-within-selected {
  98. background-color: @neutral-10;
  99. border-left: 3px solid @green-50;
  100. }
  101. &.history-version-within-selected:hover {
  102. background-color: fade(@neutral-90, 8%);
  103. }
  104. }
  105. .version-element-within-selected {
  106. background-color: @neutral-10;
  107. border-left: 3px solid @green-50;
  108. }
  109. .version-element-selected {
  110. background-color: @green-10;
  111. border-left: 3px solid @green-50;
  112. }
  113. .history-version-metadata-time {
  114. display: block;
  115. margin-bottom: 4px;
  116. color: @neutral-90;
  117. &:last-child {
  118. margin-bottom: initial;
  119. }
  120. }
  121. .history-version-metadata-users,
  122. .history-version-changes {
  123. margin: 0;
  124. padding: 0;
  125. list-style: none;
  126. }
  127. .history-version-metadata-users {
  128. display: inline;
  129. > li {
  130. display: inline-flex;
  131. align-items: center;
  132. margin-right: 8px;
  133. }
  134. }
  135. .history-version-changes {
  136. > li {
  137. margin-bottom: 4px;
  138. }
  139. }
  140. .history-version-user-badge-color {
  141. @size: 8px;
  142. display: inline-block;
  143. width: @size;
  144. height: @size;
  145. margin-right: 4px;
  146. border-radius: 2px;
  147. }
  148. .history-version-user-badge-text {
  149. overflow-wrap: anywhere;
  150. flex: 1;
  151. }
  152. .history-version-day,
  153. .history-version-change-action,
  154. .history-version-metadata-users,
  155. .history-version-origin,
  156. .history-version-saved-by {
  157. color: @neutral-70;
  158. }
  159. .history-version-change-action {
  160. overflow-wrap: anywhere;
  161. }
  162. .history-version-change-doc {
  163. color: @neutral-90;
  164. overflow-wrap: anywhere;
  165. }
  166. .history-version-divider-container {
  167. padding: 6px 8px;
  168. }
  169. .history-version-divider {
  170. margin: 0px;
  171. border-color: @neutral-20;
  172. }
  173. .history-version-badge {
  174. margin-bottom: 4px;
  175. margin-right: 10px;
  176. height: unset;
  177. white-space: normal;
  178. overflow-wrap: anywhere;
  179. }
  180. .history-version-label {
  181. margin-bottom: 4px;
  182. &:last-child {
  183. margin-bottom: initial;
  184. }
  185. }
  186. .loading {
  187. padding-top: 10rem;
  188. font-family: @font-family-serif;
  189. text-align: center;
  190. }
  191. & > .loading {
  192. flex: 1;
  193. }
  194. .history-all-versions-scroller .loading {
  195. position: sticky;
  196. bottom: 0;
  197. padding: @line-height-computed / 2 0;
  198. background-color: @gray-lightest;
  199. }
  200. .history-version-saved-by {
  201. &-label {
  202. margin-right: 8px;
  203. }
  204. }
  205. .dropdown.open {
  206. .history-version-dropdown-menu-btn {
  207. background-color: rgba(@neutral-90, 0.08);
  208. box-shadow: initial;
  209. }
  210. }
  211. .history-version-dropdown-menu-btn {
  212. @size: 30px;
  213. padding: 0;
  214. width: @size;
  215. height: @size;
  216. font-size: @font-size-small;
  217. color: @neutral-90;
  218. background-color: transparent;
  219. &:hover,
  220. &:active {
  221. z-index: initial;
  222. background-color: rgba(@neutral-90, 0.08);
  223. box-shadow: initial;
  224. }
  225. }
  226. .history-loading-panel {
  227. padding-top: 10rem;
  228. font-family: @font-family-serif;
  229. text-align: center;
  230. }
  231. .history-file-entity-operation-badge {
  232. flex: 0 0 auto;
  233. text-transform: lowercase;
  234. margin-left: 0.5em;
  235. font-size: 0.7em;
  236. background: @history-file-badge-bg;
  237. color: @history-file-badge-color;
  238. border-radius: 8px;
  239. line-height: 1;
  240. padding: 2px 4px 3px;
  241. margin-top: 2px;
  242. }
  243. .history-react-toolbar {
  244. display: flex;
  245. align-items: center;
  246. gap: 8px;
  247. .history-react-toolbar-file-info {
  248. flex: 1;
  249. text-align: right;
  250. }
  251. .history-react-toolbar-time {
  252. font-weight: 700;
  253. }
  254. }
  255. .history-paywall-prompt {
  256. padding: @history-change-list-padding;
  257. .history-feature-list {
  258. list-style: none;
  259. padding-left: 8px;
  260. li {
  261. margin-bottom: 16px;
  262. }
  263. }
  264. button {
  265. width: 100%;
  266. }
  267. }
  268. .history-version-faded .history-version-details {
  269. max-height: 6em;
  270. .mask-image(linear-gradient(black 35%, transparent));
  271. overflow: hidden;
  272. }
  273. .history-paywall-heading {
  274. .premium-text;
  275. font-family: inherit;
  276. font-size: 20px;
  277. font-weight: 700;
  278. }
  279. .history-content {
  280. padding: @line-height-computed / 2;
  281. }
  282. }
  283. .history-version-label-tooltip {
  284. padding: 6px;
  285. text-align: initial;
  286. &-row {
  287. margin-bottom: 6.25px;
  288. &-comment {
  289. overflow-wrap: anywhere;
  290. }
  291. &:last-child {
  292. margin-bottom: initial;
  293. }
  294. }
  295. }
  296. .history-version-dropdown-menu {
  297. [role='menuitem'] {
  298. padding: 10px 12px;
  299. color: @neutral-90;
  300. &:hover,
  301. &:focus {
  302. color: @neutral-90;
  303. background-color: @neutral-10;
  304. }
  305. span.material-symbols-rounded {
  306. vertical-align: middle;
  307. font-size: inherit;
  308. }
  309. }
  310. }
  311. .document-diff-container {
  312. height: 100%;
  313. display: flex;
  314. flex-direction: column;
  315. position: relative;
  316. .cm-viewer-container,
  317. .cm-editor {
  318. height: 100%;
  319. }
  320. .previous-highlight-button,
  321. .next-highlight-button {
  322. position: absolute;
  323. right: 16px;
  324. box-shadow: @box-shadow;
  325. }
  326. .previous-highlight-button {
  327. top: 16px;
  328. }
  329. .next-highlight-button {
  330. bottom: 16px;
  331. }
  332. }
  333. .history-dropdown-icon {
  334. color: @neutral-90;
  335. }
  336. .history-dropdown-icon-inverted {
  337. color: @neutral-10;
  338. vertical-align: top;
  339. }
  340. .history-compare-btn {
  341. line-height: 1;
  342. padding: 0;
  343. color: black;
  344. display: flex;
  345. justify-content: center;
  346. align-items: center;
  347. }
  348. .history-compare-btn:hover {
  349. text-decoration: none;
  350. color: black;
  351. }
  352. .history-file-tree {
  353. display: flex !important; // To work around jQuery layout's inline styles
  354. flex-direction: column;
  355. flex-grow: 1;
  356. max-height: 100%;
  357. ul.history-file-tree-list {
  358. margin: 0;
  359. overflow-x: hidden;
  360. height: 100%;
  361. flex-grow: 1;
  362. position: relative;
  363. overflow-y: auto;
  364. .history-file-tree-item > ul,
  365. ul[role='tree'] {
  366. margin-left: 22px;
  367. }
  368. li.bottom-buffer {
  369. min-height: @line-height-computed;
  370. }
  371. li {
  372. line-height: @file-tree-line-height;
  373. position: relative;
  374. margin-left: 8px;
  375. &:focus {
  376. outline: none;
  377. }
  378. .history-file-tree-item {
  379. color: @file-tree-item-color;
  380. cursor: pointer;
  381. white-space: nowrap;
  382. user-select: none;
  383. display: flex;
  384. align-items: center;
  385. &:focus {
  386. outline: none;
  387. }
  388. &:hover {
  389. background-color: @file-tree-item-hover-bg;
  390. // When the entity is a subfolder, the DOM element is "indented" via margin-left. This makes the
  391. // element not fill the entire file-tree width (as it's spaced from the left-hand side via margin)
  392. // and, in consequence, the background gets clipped. The ::before pseudo-selector is used to fill
  393. // the empty space.
  394. .fake-full-width-bg(@file-tree-item-hover-bg);
  395. }
  396. .history-file-tree-folder-button,
  397. .history-file-tree-item-button {
  398. .reset-button;
  399. &:focus {
  400. outline: none;
  401. }
  402. }
  403. .history-file-tree-item-name-wrapper {
  404. display: flex;
  405. align-items: center;
  406. width: 100%;
  407. overflow: hidden;
  408. .history-file-tree-item-name {
  409. margin-right: @margin-xs;
  410. overflow: hidden;
  411. text-overflow: ellipsis;
  412. text-align: left;
  413. font-weight: normal;
  414. flex-grow: 1;
  415. &.strikethrough {
  416. text-decoration: line-through;
  417. }
  418. }
  419. .history-file-tree-item-badge {
  420. text-transform: capitalize;
  421. font-weight: normal;
  422. margin-right: @margin-sm;
  423. flex-shrink: 0;
  424. &:hover {
  425. background-color: @neutral-20;
  426. }
  427. }
  428. }
  429. }
  430. i.fa {
  431. color: @file-tree-item-icon-color;
  432. font-size: 14px;
  433. display: inline-flex;
  434. flex-shrink: 0;
  435. &.file-tree-icon {
  436. margin-right: 4px;
  437. margin-left: 8px;
  438. }
  439. &.file-tree-folder-icon {
  440. margin-right: 4px;
  441. }
  442. &.file-tree-expand-icon {
  443. margin-left: 8px;
  444. }
  445. }
  446. i.fa-folder-open,
  447. i.fa-folder {
  448. color: @file-tree-item-folder-color;
  449. font-size: 14px;
  450. }
  451. }
  452. li.selected > .history-file-tree-item {
  453. color: @file-tree-item-selected-color;
  454. background-color: @file-tree-item-selected-bg;
  455. font-weight: bold;
  456. > div > i.fa,
  457. > button > i.fa,
  458. > i.fa {
  459. color: @file-tree-item-selected-color;
  460. }
  461. .fake-full-width-bg(@file-tree-item-selected-bg);
  462. }
  463. }
  464. }
  465. .history-error {
  466. padding: 16px;
  467. }