review-panel.less 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218
  1. @rp-base-font-size: 12px;
  2. @rp-small-font-size: 10px;
  3. @rp-icon-large-size: 18px;
  4. @rp-bg-blue: #dadfed;
  5. @rp-bg-dim-blue: #fafafa;
  6. @rp-highlight-blue: #8a96b5;
  7. @rp-border-grey: #d9d9d9;
  8. @rp-green: #2c8e30;
  9. @rp-green-on-dark: rgba(37, 107, 41, 0.5);
  10. @rp-red: #c5060b;
  11. @rp-yellow: #f3b111;
  12. @rp-yellow-on-dark: rgba(194, 93, 11, 0.5);
  13. @rp-grey: #aaaaaa;
  14. @rp-type-blue: #6b7797;
  15. @rp-type-darkgrey: #3f3f3f;
  16. @rp-entry-ribbon-width: 4px;
  17. @rp-entry-arrow-width: 6px;
  18. @rp-semibold-weight: 600;
  19. @review-panel-width: 230px;
  20. @review-off-width: 22px;
  21. @rp-toolbar-height: 32px;
  22. @rp-entry-animation-speed: 0.3s;
  23. .rp-button() {
  24. display: block; // IE doesn't do flex with inline items.
  25. background-color: @rp-highlight-blue;
  26. color: #fff;
  27. text-align: center;
  28. line-height: 1.3;
  29. user-select: none;
  30. border: 0;
  31. &:hover,
  32. &:focus {
  33. outline: 0;
  34. background-color: darken(@rp-highlight-blue, 5%);
  35. text-decoration: none;
  36. color: #fff;
  37. }
  38. &[disabled] {
  39. background-color: tint(@rp-highlight-blue, 50%);
  40. &:hover,
  41. &:focus {
  42. background-color: tint(@rp-highlight-blue, 50%);
  43. }
  44. }
  45. }
  46. .rp-collapse-arrow() {
  47. display: inline-flex;
  48. transform: rotateZ(0deg);
  49. transition: transform 0.15s ease;
  50. &-on {
  51. transform: rotateZ(-90deg);
  52. }
  53. }
  54. #review-panel {
  55. display: block;
  56. .rp-size-expanded & {
  57. display: flex;
  58. flex-direction: column;
  59. width: @review-panel-width;
  60. overflow: visible;
  61. border-left-width: 1px;
  62. }
  63. .rp-size-mini & {
  64. width: @review-off-width;
  65. z-index: 6;
  66. border-left-width: 1px;
  67. }
  68. position: absolute;
  69. top: 0px;
  70. bottom: 0px;
  71. right: 0px;
  72. background-color: @rp-bg-blue;
  73. border-left: solid 0px @rp-border-grey;
  74. font-size: @rp-base-font-size;
  75. color: @rp-type-blue;
  76. z-index: 6;
  77. }
  78. .loading-panel {
  79. .rp-size-expanded & {
  80. right: @review-panel-width;
  81. }
  82. }
  83. .review-panel-toolbar {
  84. display: none;
  85. .rp-size-expanded & {
  86. display: flex;
  87. align-items: center;
  88. justify-content: space-between;
  89. padding: 0 5px;
  90. }
  91. position: relative;
  92. border-bottom: 1px solid @rp-border-grey;
  93. background-color: @rp-bg-dim-blue;
  94. text-align: center;
  95. z-index: 3;
  96. flex-basis: 32px;
  97. flex-shrink: 0;
  98. }
  99. .review-panel-toolbar-label {
  100. cursor: pointer;
  101. text-align: right;
  102. flex-grow: 1;
  103. }
  104. .review-panel-toolbar-icon-on {
  105. margin-right: 5px;
  106. color: @ol-green;
  107. }
  108. .review-panel-toolbar-label-disabled {
  109. cursor: auto;
  110. margin-right: 5px;
  111. }
  112. .review-panel-toolbar-spinner {
  113. margin-left: 5px;
  114. }
  115. .rp-tc-state {
  116. position: absolute;
  117. top: 100%;
  118. left: 0;
  119. right: 0;
  120. overflow: hidden;
  121. list-style: none;
  122. padding: 0 5px;
  123. margin: 0;
  124. border-bottom: 1px solid @rp-border-grey;
  125. background-color: @rp-bg-dim-blue;
  126. text-align: left;
  127. }
  128. .rp-tc-state-collapse {
  129. .rp-collapse-arrow;
  130. margin-left: 5px;
  131. }
  132. .rp-tc-state-item {
  133. display: flex;
  134. align-items: center;
  135. padding: 3px 0;
  136. &:last-of-type {
  137. padding-bottom: 5px;
  138. }
  139. }
  140. .rp-tc-state-separator {
  141. border-bottom: 1px solid @rp-border-grey;
  142. }
  143. .rp-tc-state-item-everyone {
  144. border-bottom: 1px solid @rp-border-grey;
  145. }
  146. .rp-tc-state-item-name {
  147. flex-grow: 1;
  148. overflow: hidden;
  149. text-overflow: ellipsis;
  150. white-space: nowrap;
  151. font-weight: @rp-semibold-weight;
  152. }
  153. .rp-tc-state-item-name-disabled {
  154. opacity: 0.35;
  155. }
  156. .rp-entry-list {
  157. display: none;
  158. width: 100%;
  159. .rp-size-expanded &,
  160. .rp-size-mini & {
  161. display: block;
  162. }
  163. .rp-state-overview & {
  164. flex-grow: 2;
  165. overflow-y: auto;
  166. }
  167. }
  168. .rp-entry-list-inner {
  169. position: relative;
  170. }
  171. .rp-entry-indicator {
  172. display: none;
  173. z-index: 2; // above .review-panel-toggler
  174. .rp-size-mini & {
  175. display: block;
  176. }
  177. .rp-floating-entry & {
  178. display: block;
  179. position: static;
  180. width: @review-off-width - 4px;
  181. }
  182. .rp-size-mini &-add-comment {
  183. display: none;
  184. }
  185. position: absolute;
  186. left: 2px;
  187. right: 2px;
  188. text-align: center;
  189. background-color: @rp-highlight-blue;
  190. border-radius: 3px;
  191. color: #fff;
  192. cursor: pointer;
  193. transition: top @rp-entry-animation-speed, left 0.1s, right 0.1s;
  194. .no-animate & {
  195. transition: left 0.1s, right 0.1s;
  196. }
  197. &-focused {
  198. left: 0px;
  199. right: 4px;
  200. z-index: 1;
  201. }
  202. }
  203. .rp-entry-wrapper {
  204. &:hover .rp-entry-insert,
  205. &:hover .rp-entry-delete,
  206. &:hover .rp-entry-aggregate,
  207. &:hover .rp-entry-comment {
  208. display: block;
  209. }
  210. &.rp-entry-hidden {
  211. display: none;
  212. }
  213. }
  214. .rp-entry {
  215. .rp-state-current-file & {
  216. position: absolute;
  217. width: @review-panel-width;
  218. }
  219. .rp-state-current-file-mini &,
  220. .rp-floating-entry & {
  221. left: @review-off-width + @rp-entry-arrow-width;
  222. box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.2);
  223. z-index: 1;
  224. &::before {
  225. content: '';
  226. position: absolute;
  227. top: -(@review-off-width + @rp-entry-arrow-width);
  228. right: -(@review-off-width + @rp-entry-arrow-width);
  229. bottom: -(@review-off-width + @rp-entry-arrow-width);
  230. left: -(2 * @rp-entry-arrow-width + 2);
  231. z-index: -1;
  232. }
  233. &::after {
  234. .triangle(
  235. left,
  236. @rp-entry-arrow-width,
  237. @rp-entry-arrow-width * 1.5,
  238. inherit
  239. );
  240. top: (@review-off-width / 2) - @rp-entry-arrow-width;
  241. left: -(@rp-entry-ribbon-width + @rp-entry-arrow-width);
  242. content: '';
  243. }
  244. }
  245. .rp-state-current-file-mini & {
  246. display: none;
  247. }
  248. .rp-floating-entry & {
  249. position: absolute;
  250. width: @review-panel-width;
  251. left: @review-off-width + @rp-entry-arrow-width;
  252. top: 0;
  253. }
  254. .rp-state-current-file-mini.rp-layout-left &,
  255. .rp-floating-entry-layout-left & {
  256. border-left-width: 0;
  257. border-right-width: @rp-entry-ribbon-width;
  258. border-right-style: solid;
  259. &::before {
  260. left: -(@review-off-width + @rp-entry-arrow-width);
  261. }
  262. &::after {
  263. .triangle(
  264. right,
  265. @rp-entry-arrow-width,
  266. @rp-entry-arrow-width * 1.5,
  267. inherit
  268. );
  269. right: -(@rp-entry-ribbon-width + @rp-entry-arrow-width);
  270. left: auto;
  271. }
  272. }
  273. .rp-state-current-file-mini.rp-layout-left & {
  274. left: auto;
  275. right: @review-off-width + @rp-entry-arrow-width;
  276. &::before {
  277. right: -(2 * @rp-entry-arrow-width + 2);
  278. }
  279. }
  280. .rp-floating-entry-layout-left & {
  281. left: -(@review-panel-width + @rp-entry-arrow-width + 2);
  282. &::before {
  283. right: -(2 * @rp-entry-arrow-width);
  284. }
  285. }
  286. .rp-state-current-file-expanded & {
  287. visibility: hidden;
  288. left: 5px;
  289. right: 5px;
  290. width: auto;
  291. &-focused {
  292. left: -2px;
  293. right: 12px;
  294. z-index: 1;
  295. }
  296. &-add-comment {
  297. right: auto;
  298. &.rp-entry-adding-comment {
  299. right: 5px;
  300. }
  301. }
  302. &-bulk-actions {
  303. right: auto;
  304. }
  305. }
  306. .rp-state-overview & {
  307. border-radius: 0;
  308. border-bottom: solid 1px @rp-border-grey;
  309. cursor: pointer;
  310. }
  311. .resolved-comments-dropdown & {
  312. position: static;
  313. margin-bottom: 5px;
  314. }
  315. border-left: solid @rp-entry-ribbon-width transparent;
  316. border-radius: 3px;
  317. background-color: #fff;
  318. transition: top @rp-entry-animation-speed, left 0.1s, right 0.1s;
  319. .no-animate & {
  320. transition: left 0.1s, right 0.1s;
  321. }
  322. &-insert,
  323. &-aggregate {
  324. border-color: @rp-green;
  325. }
  326. &-delete {
  327. border-color: @rp-red;
  328. }
  329. &-comment {
  330. border-color: @rp-yellow;
  331. }
  332. &-comment-resolving {
  333. top: 4px;
  334. left: 6px;
  335. opacity: 0;
  336. z-index: 3;
  337. transform: scale(0.1);
  338. transform-origin: 0 0;
  339. transition: top 0.35s ease-out, left 0.35s ease-out,
  340. transform 0.35s ease-out, opacity 0.35s ease-out 0.2s;
  341. }
  342. &-comment-resolved {
  343. border-color: @rp-grey;
  344. background-color: #efefef;
  345. }
  346. &-add-comment {
  347. background-color: transparent;
  348. right: auto;
  349. border-left-width: 0;
  350. &.rp-entry-adding-comment {
  351. background-color: #fff;
  352. right: 5px;
  353. border-left-width: 3px;
  354. border-left-color: @rp-yellow;
  355. }
  356. }
  357. &-bulk-actions {
  358. background-color: transparent;
  359. right: auto;
  360. border-left-width: 0;
  361. }
  362. }
  363. .rp-entry-body {
  364. display: flex;
  365. align-items: center;
  366. padding: 4px 5px;
  367. }
  368. .rp-entry-action-icon {
  369. font-size: @rp-icon-large-size;
  370. padding: 0 3px;
  371. line-height: 0;
  372. .rp-state-overview & {
  373. display: none;
  374. }
  375. }
  376. .rp-entry-details {
  377. line-height: 1.4;
  378. margin-left: 5px;
  379. // We need to set any low-enough flex base size (0px), making it growable (1) and non-shrinkable (0).
  380. // This is needed to ensure that IE makes the element fill the available space.
  381. flex: 1 0 1px;
  382. overflow-x: auto;
  383. .rp-state-overview & {
  384. margin-left: 0;
  385. }
  386. }
  387. .rp-entry-metadata {
  388. font-size: @rp-small-font-size;
  389. }
  390. .rp-entry-metadata-element {
  391. display: inline-block;
  392. }
  393. .rp-entry-user {
  394. font-weight: @rp-semibold-weight;
  395. font-style: normal;
  396. }
  397. .rp-comment-actions {
  398. a {
  399. color: @rp-type-blue;
  400. }
  401. }
  402. .rp-content-highlight {
  403. color: @rp-type-darkgrey;
  404. font-weight: @rp-semibold-weight;
  405. text-decoration: none;
  406. del& {
  407. text-decoration: line-through;
  408. }
  409. }
  410. .rp-entry-actions {
  411. display: flex;
  412. .rp-state-overview .rp-entry-list & {
  413. display: none;
  414. }
  415. }
  416. .rp-entry-button {
  417. .rp-button();
  418. flex: 1 1 50%;
  419. border-right: solid 1px #fff;
  420. padding: 2px 0;
  421. &:last-child {
  422. border-bottom-right-radius: 3px;
  423. border-right-width: 0;
  424. }
  425. .rp-state-current-file-mini.rp-layout-left &,
  426. .rp-floating-entry-layout-left & {
  427. &:first-child {
  428. border-bottom-left-radius: 3px;
  429. }
  430. &:last-child {
  431. border-bottom-right-radius: 0;
  432. }
  433. }
  434. }
  435. .rp-comment {
  436. margin: 2px 5px;
  437. padding-bottom: 3px;
  438. line-height: 1.4;
  439. border-bottom: solid 1px @rp-border-grey;
  440. &:last-child {
  441. margin-bottom: 2px;
  442. border-bottom-width: 0;
  443. }
  444. .rp-state-overview .rp-entry-list & {
  445. margin: 4px 5px;
  446. &:first-child {
  447. margin-top: 0;
  448. padding-top: 4px;
  449. }
  450. }
  451. }
  452. .rp-comment-content {
  453. margin: 0;
  454. color: @rp-type-darkgrey;
  455. overflow-x: auto; // Long words, like links can overflow without this.
  456. white-space: pre-wrap;
  457. }
  458. .rp-comment-resolver {
  459. color: @rp-type-blue;
  460. }
  461. .rp-comment-resolver-content {
  462. font-style: italic;
  463. margin: 0;
  464. }
  465. .rp-comment-reply {
  466. padding: 0 5px;
  467. }
  468. .rp-add-comment-btn,
  469. .rp-bulk-actions-btn {
  470. .rp-button();
  471. display: inline-block;
  472. padding: 5px 10px;
  473. border-radius: 3px;
  474. .rp-in-editor-widgets & {
  475. display: block;
  476. white-space: nowrap;
  477. border-radius: 0;
  478. &:last-child {
  479. border-bottom-left-radius: 3px;
  480. }
  481. }
  482. }
  483. .rp-bulk-actions-btn {
  484. border-radius: 0;
  485. &:first-child {
  486. border-top-left-radius: 3px;
  487. border-bottom-left-radius: 3px;
  488. }
  489. &:last-child {
  490. border-top-right-radius: 3px;
  491. border-bottom-right-radius: 3px;
  492. margin-left: 1px;
  493. }
  494. }
  495. .rp-new-comment {
  496. padding: 5px;
  497. }
  498. .rp-comment-input {
  499. width: 100%;
  500. font-size: @rp-base-font-size;
  501. padding: 2px 5px;
  502. border-radius: 3px;
  503. border: solid 1px @rp-border-grey;
  504. resize: vertical;
  505. color: @rp-type-darkgrey;
  506. background-color: #fff;
  507. margin-top: 3px;
  508. overflow-x: hidden;
  509. min-height: 3em;
  510. max-height: 400px;
  511. }
  512. .rp-icon-delete {
  513. display: inline-block;
  514. line-height: 1;
  515. font-style: normal;
  516. font-size: 0.8em;
  517. text-decoration: line-through;
  518. font-weight: @rp-semibold-weight;
  519. &::before {
  520. content: 'Ab';
  521. }
  522. }
  523. .rp-resolved-comment {
  524. border-left: solid @rp-entry-ribbon-width @rp-yellow;
  525. border-radius: 3px;
  526. background-color: #fff;
  527. margin-bottom: 5px;
  528. }
  529. .rp-resolved-comment-context {
  530. background-color: lighten(@rp-yellow, 35%);
  531. padding: 4px 5px;
  532. }
  533. .rp-resolved-comment-context-file {
  534. font-weight: @rp-semibold-weight;
  535. }
  536. .rp-resolved-comment-context-quote {
  537. color: #000;
  538. font-family: @font-family-monospace;
  539. margin: 0;
  540. }
  541. .rp-entry-callout {
  542. transition: top @rp-entry-animation-speed, height @rp-entry-animation-speed;
  543. .rp-state-current-file & {
  544. position: absolute;
  545. border-top: 1px solid grey;
  546. border-right: 1px dashed grey;
  547. &::after {
  548. content: '';
  549. position: absolute;
  550. top: -1px;
  551. left: 3px;
  552. bottom: 0;
  553. border-bottom: 1px solid grey;
  554. }
  555. }
  556. .rp-state-current-file-expanded & {
  557. width: 3px;
  558. &::after {
  559. width: 3px;
  560. }
  561. }
  562. .rp-state-current-file-mini & {
  563. width: 1px;
  564. &::after {
  565. width: 1px;
  566. }
  567. }
  568. .rp-state-overview & {
  569. display: none;
  570. }
  571. .rp-state-current-file &-inverted {
  572. border-top: none;
  573. border-bottom: 1px solid grey;
  574. &::after {
  575. top: 0px;
  576. bottom: -1px;
  577. border-top: 1px solid grey;
  578. border-bottom: none;
  579. }
  580. }
  581. .rp-state-current-file &-insert {
  582. border-color: @rp-green;
  583. &::after {
  584. border-color: @rp-green;
  585. }
  586. }
  587. .rp-state-current-file &-delete {
  588. border-color: @rp-red;
  589. &::after {
  590. border-color: @rp-red;
  591. }
  592. }
  593. .rp-state-current-file &-comment {
  594. border-color: @rp-yellow;
  595. &::after {
  596. border-color: @rp-yellow;
  597. }
  598. }
  599. .rp-size-mini &-add-comment {
  600. display: none;
  601. }
  602. }
  603. .rp-overview-file-header {
  604. padding: 2px 5px;
  605. border-top: solid 1px @rp-border-grey;
  606. border-bottom: solid 1px @rp-border-grey;
  607. background-color: @rp-bg-dim-blue;
  608. margin-top: 10px;
  609. font-weight: @rp-semibold-weight;
  610. text-align: center;
  611. cursor: pointer;
  612. }
  613. .rp-overview-file-num-entries {
  614. font-weight: normal;
  615. font-size: 0.9em;
  616. }
  617. .rp-overview-file-header-collapse {
  618. .rp-collapse-arrow;
  619. float: left;
  620. }
  621. .rp-overview-file-entries {
  622. overflow: hidden;
  623. }
  624. .rp-comment-wrapper {
  625. transition: 0.35s opacity ease-out 0.2s;
  626. &-resolving {
  627. opacity: 0;
  628. }
  629. }
  630. .rp-loading,
  631. .rp-empty {
  632. text-align: center;
  633. padding: 5px;
  634. }
  635. .rp-nav {
  636. display: none;
  637. flex-shrink: 0;
  638. .rp-size-expanded & {
  639. display: flex;
  640. }
  641. .rp-state-current-file & {
  642. position: absolute;
  643. bottom: 0;
  644. }
  645. width: 100%;
  646. font-size: @rp-icon-large-size;
  647. text-align: center;
  648. background-color: @rp-bg-dim-blue;
  649. border-top: solid 1px @rp-border-grey;
  650. z-index: 2;
  651. }
  652. .rp-nav-item {
  653. display: block;
  654. color: lighten(@rp-type-blue, 25%);
  655. flex: 0 0 50%;
  656. border-top: solid 3px transparent;
  657. padding-bottom: 2px;
  658. &:hover,
  659. &:focus {
  660. text-decoration: none;
  661. color: @rp-type-blue;
  662. }
  663. &-active {
  664. color: @rp-type-blue;
  665. border-top: solid 3px @rp-highlight-blue;
  666. }
  667. }
  668. .rp-nav-label {
  669. display: block;
  670. font-size: @rp-base-font-size;
  671. }
  672. #editor {
  673. .rp-size-mini & {
  674. right: @review-off-width;
  675. }
  676. .rp-size-expanded & {
  677. right: @review-panel-width;
  678. left: 0px;
  679. width: auto;
  680. }
  681. }
  682. #editor.review-panel-react {
  683. right: 0;
  684. }
  685. .cm-editor-wrapper {
  686. @rp-yellow-for-cm: fade(
  687. @rp-yellow,
  688. 40%
  689. ); // Get the RGBA colour with transparency
  690. @rp-green-for-cm: fade(
  691. @rp-green,
  692. 40%
  693. ); // Get the RGBA colour with transparency
  694. .track-changes-marker {
  695. border-radius: 0;
  696. }
  697. .track-changes-added-marker {
  698. // Uses rgba so not to affect the opacity of the text - doesn't layer like ace
  699. background-color: @rp-green-for-cm;
  700. color: black;
  701. }
  702. .track-changes-deleted-marker {
  703. border-left: 2px dotted #c5060b;
  704. // Commented out styles for callout to be reimplemented later
  705. // border-bottom: 1px dashed #c5060b;
  706. // width: 100%;
  707. }
  708. .track-changes-comment-marker {
  709. // Uses rgba so not to affect the opacity of the text - doesn't layer like ace
  710. background-color: @rp-yellow-for-cm;
  711. color: black;
  712. }
  713. .track-changes-added-marker.track-changes-comment-marker {
  714. background-color: mix(@rp-yellow-for-cm, @rp-green-for-cm);
  715. }
  716. }
  717. .review-icon {
  718. display: inline-block;
  719. background: url('../../../../public/img/ol-icons/review-icon-dark-theme.svg')
  720. top/30px no-repeat;
  721. width: 30px;
  722. &::before {
  723. content: '\00a0'; // Non-breakable space. A non-breakable character here makes this icon work like font-awesome.
  724. }
  725. }
  726. button when (@is-overleaf-light = true) {
  727. .review-icon {
  728. background: url('../../../../public/img/ol-icons/review-icon-light-theme.svg')
  729. top/30px no-repeat;
  730. }
  731. &.active,
  732. &:active {
  733. .review-icon {
  734. background: url('../../../../public/img/ol-icons/review-icon-dark-theme.svg')
  735. top/30px no-repeat;
  736. }
  737. }
  738. }
  739. .resolved-comments-toggle {
  740. background-color: @gray-lightest;
  741. font-size: 14px;
  742. color: lighten(@rp-type-blue, 25%);
  743. border: solid 1px @rp-border-grey;
  744. border-radius: 3px;
  745. padding: 0 4px;
  746. display: block;
  747. height: 22px;
  748. width: 22px;
  749. line-height: 1.4;
  750. &:hover,
  751. &:focus {
  752. text-decoration: none;
  753. color: @rp-type-blue;
  754. }
  755. }
  756. .resolved-comments-backdrop {
  757. display: none;
  758. position: fixed;
  759. top: 0;
  760. right: 0;
  761. bottom: 0;
  762. left: 0;
  763. &-visible {
  764. display: block;
  765. }
  766. }
  767. .resolved-comments-dropdown {
  768. display: none;
  769. position: absolute;
  770. width: 300px;
  771. left: -150px;
  772. max-height: ~'calc(100vh - 100px)';
  773. margin-top: @rp-entry-arrow-width * 1.5;
  774. margin-left: 1em;
  775. background-color: @rp-bg-blue;
  776. text-align: left;
  777. align-items: stretch;
  778. justify-content: center;
  779. border-radius: 3px;
  780. box-shadow: 0 0 20px 10px rgba(0, 0, 0, 0.3);
  781. z-index: 1;
  782. &::before {
  783. content: '';
  784. .triangle(
  785. top,
  786. @rp-entry-arrow-width * 3,
  787. @rp-entry-arrow-width * 1.5,
  788. @rp-bg-blue
  789. );
  790. top: -@rp-entry-ribbon-width * 2;
  791. left: 50%;
  792. margin-left: -@rp-entry-arrow-width * 0.75;
  793. }
  794. &-open {
  795. display: flex;
  796. }
  797. }
  798. .resolved-comments-scroller {
  799. flex: 0 0 auto; // Can't use 100% in the flex-basis key here, IE won't account for padding.
  800. width: 100%; // We need to set the width explicitly, as flex-basis won't work.
  801. max-height: ~'calc(100vh - 100px)'; // We also need to explicitly set the max-height, IE won't compute the flex-determined height.
  802. padding: 5px;
  803. overflow-y: auto;
  804. }
  805. .rp-collapse-toggle {
  806. color: @rp-type-blue;
  807. font-weight: @rp-semibold-weight;
  808. &:hover,
  809. &:focus {
  810. color: darken(@rp-type-blue, 5%);
  811. text-decoration: none;
  812. }
  813. }
  814. .rp-in-editor-widgets {
  815. position: absolute;
  816. top: 0;
  817. right: 0;
  818. font-size: 11px;
  819. z-index: 2;
  820. .rp-offset-widgets & {
  821. top: 32px;
  822. }
  823. }
  824. .rp-track-changes-indicator {
  825. display: block;
  826. padding: 5px 10px;
  827. background-color: rgba(240, 240, 240, 0.9);
  828. color: @rp-type-blue;
  829. text-align: center;
  830. border-bottom-left-radius: 3px;
  831. white-space: nowrap;
  832. &.rp-track-changes-indicator-on-dark {
  833. background-color: rgba(88, 88, 88, 0.8);
  834. color: #fff;
  835. &:hover,
  836. &:focus {
  837. background-color: rgba(88, 88, 88, 1);
  838. color: #fff;
  839. }
  840. }
  841. &:hover,
  842. &:focus {
  843. outline: 0;
  844. text-decoration: none;
  845. background-color: rgba(240, 240, 240, 1);
  846. color: @rp-type-blue;
  847. }
  848. }
  849. .review-panel-toggler {
  850. display: none;
  851. position: absolute;
  852. top: 0;
  853. bottom: 0;
  854. width: 10px;
  855. opacity: 0.5;
  856. color: @rp-highlight-blue;
  857. z-index: 1;
  858. background-color: transparent;
  859. transition: background 0.1s;
  860. .rp-size-expanded & {
  861. &::after {
  862. content: '\f105';
  863. }
  864. }
  865. &:hover,
  866. &:focus {
  867. color: @rp-highlight-blue;
  868. background-color: #fff;
  869. }
  870. &::after {
  871. content: '\f104';
  872. font-family: FontAwesome;
  873. line-height: 1;
  874. -webkit-font-smoothing: antialiased;
  875. -moz-osx-font-smoothing: grayscale;
  876. font-size: 16px;
  877. display: block;
  878. position: absolute;
  879. top: 50%;
  880. width: 100%;
  881. text-align: center;
  882. margin-top: -0.5em;
  883. }
  884. }
  885. // Helper class for elements which aren't treated as flex-items by IE10, e.g:
  886. // * inline items;
  887. // * unknown elements (elements which aren't standard DOM elements, such as custom element directives)
  888. .rp-flex-block {
  889. display: block;
  890. }
  891. // CM6-specific review panel rules
  892. .ol-cm-review-panel {
  893. position: relative;
  894. z-index: 6;
  895. flex-shrink: 0;
  896. background-color: @rp-bg-blue;
  897. border-left: solid 0 @rp-border-grey;
  898. font-family: @font-family-base;
  899. line-height: @line-height-base;
  900. font-size: @rp-base-font-size;
  901. color: @rp-type-blue;
  902. box-sizing: content-box;
  903. .rp-size-expanded & {
  904. display: flex;
  905. flex-direction: column;
  906. width: @review-panel-width;
  907. overflow: visible;
  908. border-left-width: 1px;
  909. }
  910. .rp-size-mini & {
  911. width: @review-off-width;
  912. z-index: 6;
  913. border-left-width: 1px;
  914. }
  915. .review-panel-toggler {
  916. flex-direction: column;
  917. padding: 0;
  918. border: 0;
  919. .rp-size-mini &,
  920. .rp-size-expanded & {
  921. display: flex;
  922. }
  923. &:after {
  924. position: sticky;
  925. top: 50%;
  926. bottom: 50%;
  927. }
  928. }
  929. .review-panel-toolbar-collapse-button {
  930. border: none;
  931. background: none;
  932. padding: 0;
  933. }
  934. &.rp-current-file-container {
  935. display: none;
  936. .rp-size-mini &,
  937. .rp-size-expanded & {
  938. display: block;
  939. }
  940. .review-panel-toolbar {
  941. position: sticky;
  942. top: 0;
  943. }
  944. .rp-nav {
  945. position: sticky;
  946. bottom: 0;
  947. }
  948. }
  949. .rp-entry-list-react {
  950. position: relative;
  951. overflow: hidden;
  952. .rp-size-mini & {
  953. overflow: visible;
  954. }
  955. }
  956. .rp-state-current-file & {
  957. .review-panel-tools {
  958. display: flex;
  959. flex-direction: column;
  960. justify-content: space-between;
  961. position: absolute;
  962. top: 0;
  963. bottom: 0;
  964. left: 0;
  965. right: 0;
  966. }
  967. }
  968. .rp-state-overview & {
  969. position: sticky;
  970. top: 0;
  971. display: flex;
  972. flex-direction: column;
  973. height: 100%;
  974. }
  975. .rp-nav-item {
  976. border-right: 0;
  977. border-bottom: 0;
  978. border-left: 0;
  979. background: none;
  980. }
  981. }
  982. .rp-floating-entry {
  983. position: absolute;
  984. font-size: @rp-base-font-size;
  985. color: @rp-type-blue;
  986. }
  987. .ol-cm-review-panel,
  988. .rp-floating-entry {
  989. .rp-entry-metadata {
  990. button {
  991. padding: 0;
  992. border: 0;
  993. background-color: transparent;
  994. color: @ol-blue;
  995. &:hover,
  996. &:focus {
  997. text-decoration: underline;
  998. }
  999. }
  1000. }
  1001. }
  1002. .react-rp-in-editor-widgets {
  1003. position: sticky;
  1004. font-family: @font-family-sans-serif;
  1005. .rp-in-editor-widgets-inner {
  1006. position: absolute;
  1007. top: 0;
  1008. right: 0;
  1009. display: flex;
  1010. flex-direction: column;
  1011. }
  1012. .rp-track-changes-indicator {
  1013. border: 0;
  1014. }
  1015. }