review-panel.less 22 KB

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