history-react.less 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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. .history-react-toolbar {
  157. display: flex;
  158. justify-content: space-between;
  159. align-items: center;
  160. width: 100%;
  161. .history-react-toolbar-time {
  162. font-weight: 700;
  163. }
  164. }
  165. }
  166. .history-version-label-tooltip {
  167. padding: 6px;
  168. text-align: initial;
  169. &-row {
  170. margin-bottom: 6.25px;
  171. &:last-child {
  172. margin-bottom: initial;
  173. }
  174. }
  175. }
  176. .document-diff-container {
  177. height: 100%;
  178. display: flex;
  179. flex-direction: column;
  180. position: relative;
  181. .cm-viewer-container,
  182. .cm-editor {
  183. height: 100%;
  184. }
  185. .previous-highlight-button,
  186. .next-highlight-button {
  187. position: absolute;
  188. right: 16px;
  189. }
  190. .previous-highlight-button {
  191. top: 16px;
  192. }
  193. .next-highlight-button {
  194. bottom: 16px;
  195. }
  196. }
  197. .history-file-tree {
  198. display: flex !important; // To work around jQuery layout's inline styles
  199. flex-direction: column;
  200. flex-grow: 1;
  201. max-height: 100%;
  202. ul.history-file-tree-list {
  203. margin: 0;
  204. overflow-x: hidden;
  205. height: 100%;
  206. flex-grow: 1;
  207. position: relative;
  208. overflow-y: auto;
  209. .history-file-tree-item > ul,
  210. ul[role='tree'] {
  211. margin-left: 22px;
  212. }
  213. li.bottom-buffer {
  214. min-height: @line-height-computed;
  215. }
  216. li {
  217. line-height: @file-tree-line-height;
  218. position: relative;
  219. &:focus {
  220. outline: none;
  221. }
  222. .history-file-tree-item {
  223. color: @file-tree-item-color;
  224. cursor: pointer;
  225. white-space: nowrap;
  226. overflow: hidden;
  227. text-overflow: clip;
  228. user-select: none;
  229. &:focus {
  230. outline: none;
  231. }
  232. &:hover {
  233. background-color: @file-tree-item-hover-bg;
  234. // When the entity is a subfolder, the DOM element is "indented" via margin-left. This makes the
  235. // element not fill the entire file-tree width (as it's spaced from the left-hand side via margin)
  236. // and, in consequence, the background gets clipped. The ::before pseudo-selector is used to fill
  237. // the empty space.
  238. .fake-full-width-bg(@file-tree-item-hover-bg);
  239. }
  240. .history-file-tree-folder-button,
  241. .history-file-tree-item-button {
  242. .reset-button;
  243. &:focus {
  244. outline: none;
  245. }
  246. }
  247. .history-file-tree-item-button {
  248. width: 100%;
  249. overflow: hidden;
  250. text-overflow: ellipsis;
  251. text-align: left;
  252. padding-right: 40px;
  253. font-weight: normal;
  254. display: inline-flex;
  255. flex-direction: row;
  256. align-items: center;
  257. justify-content: space-between;
  258. .history-file-tree-item-button-text {
  259. display: inline-flex;
  260. margin-right: 5px;
  261. }
  262. .history-file-tree-item-button-badge {
  263. text-transform: capitalize;
  264. &:hover {
  265. background-color: @neutral-20;
  266. }
  267. }
  268. }
  269. }
  270. i.fa {
  271. color: @file-tree-item-icon-color;
  272. font-size: 14px;
  273. &.file-tree-icon {
  274. margin-right: 4px;
  275. margin-left: 8px;
  276. }
  277. &.file-tree-folder-icon {
  278. margin-right: 4px;
  279. }
  280. &.file-tree-expand-icon {
  281. margin-left: 8px;
  282. }
  283. }
  284. i.fa-folder-open,
  285. i.fa-folder {
  286. color: @file-tree-item-folder-color;
  287. font-size: 14px;
  288. }
  289. }
  290. li.selected > .history-file-tree-item {
  291. color: @file-tree-item-selected-color;
  292. background-color: @file-tree-item-selected-bg;
  293. font-weight: bold;
  294. > div > i.fa,
  295. > button > i.fa,
  296. > i.fa {
  297. color: @file-tree-item-selected-color;
  298. }
  299. .fake-full-width-bg(@file-tree-item-selected-bg);
  300. }
  301. }
  302. }