review-panel.less 21 KB

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