history-react.less 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. @versions-list-width: 320px;
  2. @history-toolbar-height: 40px;
  3. history-root {
  4. height: 100%;
  5. display: block;
  6. }
  7. .history-react {
  8. display: flex;
  9. height: 100%;
  10. background-color: @history-main-bg;
  11. .history-header {
  12. height: @history-toolbar-height;
  13. background-color: @history-react-header-bg;
  14. color: @history-react-header-color;
  15. font-size: @font-size-small;
  16. display: flex;
  17. flex-direction: column;
  18. justify-content: center;
  19. box-sizing: border-box;
  20. }
  21. .doc-panel {
  22. flex: 1;
  23. display: flex;
  24. flex-direction: column;
  25. .toolbar-container {
  26. border-bottom: 1px solid @history-react-separator-color;
  27. padding: 0 8px;
  28. }
  29. .doc-container {
  30. flex: 1;
  31. overflow-y: auto;
  32. }
  33. }
  34. .change-list {
  35. display: flex;
  36. flex-direction: column;
  37. width: @versions-list-width;
  38. font-size: @font-size-small;
  39. border-left: 1px solid @history-react-separator-color;
  40. box-sizing: content-box;
  41. }
  42. .toggle-switch-label {
  43. flex: 1;
  44. span {
  45. display: block;
  46. }
  47. }
  48. .history-version-list-container {
  49. flex: 1;
  50. overflow-y: auto;
  51. }
  52. .history-toggle-switch-container,
  53. .history-version-day,
  54. .history-version-details {
  55. padding: 0 16px;
  56. }
  57. .history-version-day {
  58. position: sticky;
  59. top: 0;
  60. display: block;
  61. padding-top: 12px;
  62. padding-bottom: 4px;
  63. line-height: 20px;
  64. background-color: @white;
  65. }
  66. .history-version-details {
  67. padding-top: 8px;
  68. padding-bottom: 8px;
  69. &:hover {
  70. cursor: pointer;
  71. background-color: @neutral-10;
  72. }
  73. }
  74. .history-version-selected {
  75. background-color: @green-10;
  76. }
  77. .history-version-metadata-time {
  78. display: block;
  79. margin-bottom: 4px;
  80. color: @neutral-90;
  81. &:last-child {
  82. margin-bottom: initial;
  83. }
  84. }
  85. .history-version-metadata-users,
  86. .history-version-changes {
  87. margin: 0;
  88. padding: 0;
  89. list-style: none;
  90. }
  91. .history-version-metadata-users {
  92. display: inline;
  93. > li {
  94. display: inline-flex;
  95. align-items: center;
  96. margin-right: 8px;
  97. }
  98. }
  99. .history-version-changes {
  100. > li {
  101. margin-bottom: 4px;
  102. }
  103. }
  104. .history-version-user-badge-color {
  105. @size: 8px;
  106. display: inline-block;
  107. width: @size;
  108. height: @size;
  109. margin-right: 4px;
  110. border-radius: 2px;
  111. }
  112. .history-version-day,
  113. .history-version-change-action,
  114. .history-version-metadata-users,
  115. .history-version-origin,
  116. .history-version-saved-by {
  117. color: @neutral-70;
  118. }
  119. .history-version-change-doc {
  120. color: @neutral-90;
  121. }
  122. .history-version-divider {
  123. margin: 6px 8px;
  124. border-color: @neutral-20;
  125. }
  126. .history-version-badge {
  127. margin-bottom: 4px;
  128. margin-right: 10px;
  129. }
  130. .history-version-saved-by {
  131. margin-bottom: 4px;
  132. &-label {
  133. margin-right: 8px;
  134. }
  135. &:last-child {
  136. margin-bottom: initial;
  137. }
  138. }
  139. .history-loading-panel {
  140. padding-top: 10rem;
  141. font-family: @font-family-serif;
  142. text-align: center;
  143. }
  144. .history-file-entity-operation-badge {
  145. flex: 0 0 auto;
  146. text-transform: lowercase;
  147. margin-left: 0.5em;
  148. font-size: 0.7em;
  149. background: @history-file-badge-bg;
  150. color: @history-file-badge-color;
  151. border-radius: 8px;
  152. line-height: 1;
  153. padding: 2px 4px 3px;
  154. margin-top: 2px;
  155. }
  156. }
  157. .history-version-label-tooltip {
  158. padding: 6px;
  159. text-align: initial;
  160. &-row {
  161. margin-bottom: 6.25px;
  162. &:last-child {
  163. margin-bottom: initial;
  164. }
  165. }
  166. }
  167. .document-diff-container {
  168. height: 100%;
  169. display: flex;
  170. flex-direction: column;
  171. position: relative;
  172. .cm-viewer-container,
  173. .cm-editor {
  174. height: 100%;
  175. }
  176. .previous-highlight-button,
  177. .next-highlight-button {
  178. position: absolute;
  179. right: 16px;
  180. }
  181. .previous-highlight-button {
  182. top: 16px;
  183. }
  184. .next-highlight-button {
  185. bottom: 16px;
  186. }
  187. }