review-panel.less 23 KB

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