review-panel.less 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179
  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: .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, .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(left, @rp-entry-arrow-width, @rp-entry-arrow-width * 1.5, inherit);
  273. top: (@review-off-width / 2) - @rp-entry-arrow-width;
  274. left: -(@rp-entry-ribbon-width + @rp-entry-arrow-width);
  275. content: '';
  276. }
  277. }
  278. .rp-state-current-file-mini.rp-layout-left & {
  279. left: auto;
  280. right: @review-off-width + @rp-entry-arrow-width;
  281. border-left-width: 0;
  282. border-right-width: @rp-entry-ribbon-width;
  283. border-right-style: solid;
  284. &::before {
  285. left: -(@review-off-width + @rp-entry-arrow-width);
  286. right: -(2 * @rp-entry-arrow-width + 2);
  287. }
  288. &::after {
  289. .triangle(right, @rp-entry-arrow-width, @rp-entry-arrow-width * 1.5, inherit);
  290. right: -(@rp-entry-ribbon-width + @rp-entry-arrow-width);
  291. left: auto;
  292. }
  293. }
  294. .rp-state-current-file-expanded & {
  295. visibility: hidden;
  296. left: 5px;
  297. right: 5px;
  298. width: auto;
  299. &-focused {
  300. left: -2px;
  301. right: 12px;
  302. z-index: 1;
  303. }
  304. &-add-comment {
  305. right: auto;
  306. &.rp-entry-adding-comment {
  307. right: 5px;
  308. }
  309. }
  310. &-bulk-actions {
  311. right: auto;
  312. }
  313. }
  314. .rp-state-overview & {
  315. border-radius: 0;
  316. border-bottom: solid 1px @rp-border-grey;
  317. cursor: pointer;
  318. }
  319. .resolved-comments-dropdown & {
  320. position: static;
  321. margin-bottom: 5px;
  322. }
  323. border-left: solid @rp-entry-ribbon-width transparent;
  324. border-radius: 3px;
  325. background-color: #FFF;
  326. transition: top @rp-entry-animation-speed, left 0.1s, right 0.1s;
  327. .no-animate & {
  328. transition: none;
  329. }
  330. &-insert,
  331. &-aggregate {
  332. border-color: @rp-green;
  333. }
  334. &-delete {
  335. border-color: @rp-red;
  336. }
  337. &-comment {
  338. border-color: @rp-yellow;
  339. }
  340. &-comment-resolving {
  341. top: 4px;
  342. left: 6px;
  343. opacity: 0;
  344. z-index: 3;
  345. transform: scale(.1);
  346. transform-origin: 0 0;
  347. transition: top .35s ease-out, left .35s ease-out, transform .35s ease-out, opacity .35s ease-out .2s;
  348. }
  349. &-comment-resolved {
  350. border-color: @rp-grey;
  351. background-color: #efefef;
  352. }
  353. &-add-comment {
  354. background-color: transparent;
  355. right: auto;
  356. border-left-width: 0;
  357. &.rp-entry-adding-comment {
  358. background-color: #FFF;
  359. right: 5px;
  360. border-left-width: 3px;
  361. border-left-color: @rp-yellow;
  362. }
  363. }
  364. &-bulk-actions {
  365. background-color: transparent;
  366. right: auto;
  367. border-left-width: 0;
  368. }
  369. }
  370. .rp-entry-body {
  371. display: flex;
  372. align-items: center;
  373. padding: 4px 5px;
  374. }
  375. .rp-entry-action-icon {
  376. font-size: @rp-icon-large-size;
  377. padding: 0 3px;
  378. line-height: 0;
  379. .rp-state-overview & {
  380. display: none;
  381. }
  382. }
  383. .rp-entry-details {
  384. line-height: 1.4;
  385. margin-left: 5px;
  386. // We need to set any low-enough flex base size (0px), making it growable (1) and non-shrinkable (0).
  387. // This is needed to ensure that IE makes the element fill the available space.
  388. flex: 1 0 1px;
  389. overflow-x: auto;
  390. .rp-state-overview & {
  391. margin-left: 0;
  392. }
  393. }
  394. .rp-entry-metadata {
  395. font-size: @rp-small-font-size;
  396. }
  397. .rp-entry-user {
  398. font-weight: @rp-semibold-weight;
  399. font-style: normal;
  400. }
  401. .rp-comment-actions {
  402. a { color: @rp-type-blue; }
  403. }
  404. .rp-content-highlight {
  405. color: @rp-type-darkgrey;
  406. font-weight: @rp-semibold-weight;
  407. text-decoration: none;
  408. del& {
  409. text-decoration: line-through;
  410. }
  411. }
  412. .rp-entry-actions {
  413. display: flex;
  414. .rp-state-overview .rp-entry-list & {
  415. display: none;
  416. }
  417. }
  418. .rp-entry-button {
  419. .rp-button();
  420. flex: 1 1 50%;
  421. border-right: solid 1px #FFF;
  422. padding: 2px 0;
  423. &:last-child {
  424. border-bottom-right-radius: 3px;
  425. border-right-width: 0;
  426. }
  427. .rp-state-current-file-mini.rp-layout-left & {
  428. &:first-child {
  429. border-bottom-left-radius: 3px;
  430. }
  431. &:last-child {
  432. border-bottom-right-radius: 0;
  433. }
  434. }
  435. }
  436. .rp-comment {
  437. margin: 2px 5px;
  438. padding-bottom: 3px;
  439. line-height: 1.4;
  440. border-bottom: solid 1px @rp-border-grey;
  441. &:last-child {
  442. margin-bottom: 2px;
  443. border-bottom-width: 0;
  444. }
  445. .rp-state-overview .rp-entry-list & {
  446. margin: 4px 5px;
  447. &:first-child {
  448. margin-top: 0;
  449. padding-top: 4px;
  450. }
  451. }
  452. }
  453. .rp-comment-content {
  454. margin: 0;
  455. color: @rp-type-darkgrey;
  456. overflow-x: auto; // Long words, like links can overflow without this.
  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: .35s opacity ease-out .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-unsupported & {
  642. display: none;
  643. }
  644. .rp-state-current-file & {
  645. position: absolute;
  646. bottom: 0;
  647. }
  648. width: 100%;
  649. font-size: @rp-icon-large-size;
  650. text-align: center;
  651. background-color: @rp-bg-dim-blue;
  652. border-top: solid 1px @rp-border-grey;
  653. z-index: 2;
  654. }
  655. .rp-nav-item {
  656. display: block;
  657. color: lighten(@rp-type-blue, 25%);
  658. flex: 0 0 50%;
  659. border-top: solid 3px transparent;
  660. padding-bottom: 2px;
  661. &:hover,
  662. &:focus {
  663. text-decoration: none;
  664. color: @rp-type-blue;
  665. }
  666. &-active {
  667. color: @rp-type-blue;
  668. border-top: solid 3px @rp-highlight-blue;
  669. }
  670. }
  671. .rp-nav-label {
  672. display: block;
  673. font-size: @rp-base-font-size;
  674. }
  675. #editor {
  676. .rp-size-mini & {
  677. right: @review-off-width;
  678. .ace-editor-body {
  679. overflow: visible;
  680. .ace_scrollbar-v {
  681. right: -@review-off-width;
  682. }
  683. }
  684. }
  685. .rp-size-expanded & {
  686. right: @review-panel-width;
  687. left: 0px;
  688. width: auto;
  689. }
  690. .rp-state-current-file-expanded & {
  691. .ace-editor-body {
  692. overflow: visible;
  693. .ace_scrollbar-v {
  694. right: -@review-panel-width;
  695. }
  696. }
  697. }
  698. }
  699. #editor-rich-text {
  700. .rp-size-expanded & {
  701. right: @review-panel-width;
  702. }
  703. }
  704. .rp-toggle {
  705. display: inline-block;
  706. vertical-align: middle;
  707. padding-left: 5px;
  708. }
  709. .rp-toggle-hidden-input {
  710. display: none;
  711. + .rp-toggle-btn {
  712. display: block;
  713. width: 3.5em;
  714. height: 1.75em;
  715. position: relative;
  716. outline: 0;
  717. margin: 0;
  718. font-weight: normal;
  719. cursor: pointer;
  720. user-select: none;
  721. padding: 1px;
  722. background-color: @rp-highlight-blue;
  723. border: 1px solid #FFF;
  724. border-radius: .875em;
  725. transition: background .15s ease, border-color 0.15s ease;
  726. &::before {
  727. content: '';
  728. display: block;
  729. width: 50%;
  730. height: 100%;
  731. position: relative;
  732. left: 0;
  733. background-color: #FFF;
  734. border-radius: .875em;
  735. transition: background-color 0.15s ease, color 0.15s ease, left 0.15s ease;
  736. }
  737. }
  738. &:checked + .rp-toggle-btn {
  739. background-color: @red;
  740. border-color: #FFF;
  741. &::before {
  742. left: 50%;
  743. background-color: #FFF;
  744. }
  745. }
  746. &:disabled + .rp-toggle-btn {
  747. cursor: default;
  748. opacity: .35;
  749. }
  750. }
  751. .rp-unsupported-msg-wrapper {
  752. display: none;
  753. .rp-size-expanded.rp-unsupported & {
  754. display: block;
  755. }
  756. height: 100%;
  757. .rp-unsupported-msg {
  758. display: flex;
  759. width: @review-panel-width - 40px;
  760. height: 100%;
  761. flex-direction: column;
  762. justify-content: center;
  763. align-items: center;
  764. margin: 0 auto;
  765. text-align: center;
  766. .rp-unsupported-msg-title {
  767. font-size: 1.3em;
  768. margin-top: 13px;
  769. }
  770. }
  771. }
  772. .ace-editor-wrapper {
  773. .track-changes-marker-callout {
  774. border-radius: 0;
  775. position: absolute;
  776. .rp-state-overview &, .rp-loading-threads & {
  777. display: none;
  778. }
  779. }
  780. .track-changes-added-marker-callout {
  781. border-bottom: 1px dashed @rp-green;
  782. z-index: 1;
  783. }
  784. .track-changes-comment-marker-callout {
  785. border-bottom: 1px dashed @rp-yellow;
  786. }
  787. .track-changes-deleted-marker-callout {
  788. border-bottom: 1px dashed @rp-red;
  789. }
  790. .track-changes-marker {
  791. border-radius: 0;
  792. position: absolute;
  793. .rp-loading-threads & {
  794. display: none;
  795. }
  796. z-index: 6 // Appear above text selection
  797. }
  798. .track-changes-comment-marker {
  799. background-color: @rp-yellow;
  800. opacity: 0.3;
  801. }
  802. .track-changes-added-marker {
  803. background-color: @rp-green;
  804. opacity: 0.3;
  805. }
  806. .track-changes-deleted-marker {
  807. border-left: 2px dotted @rp-red;
  808. margin-left: -1px;
  809. }
  810. .ace_dark {
  811. .track-changes-comment-marker {
  812. background-color: @rp-yellow-on-dark
  813. }
  814. .track-changes-added-marker {
  815. background-color: @rp-green-on-dark;
  816. }
  817. }
  818. }
  819. .cm-editor-wrapper {
  820. @rp-yellow-for-cm: fade(@rp-yellow, 40%); // Get the RGBA colour with transparency
  821. @rp-green-for-cm: fade(@rp-green, 40%); // Get the RGBA colour with transparency
  822. .track-changes-marker {
  823. border-radius: 0;
  824. }
  825. .track-changes-added-marker {
  826. // Uses rgba so not to affect the opacity of the text - doesn't layer like ace
  827. background-color: @rp-green-for-cm;
  828. color: black;
  829. }
  830. .track-changes-deleted-marker {
  831. border-left: 2px dotted #c5060b;
  832. // Commented out styles for callout to be reimplemented later
  833. // border-bottom: 1px dashed #c5060b;
  834. // width: 100%;
  835. }
  836. .track-changes-comment-marker {
  837. // Uses rgba so not to affect the opacity of the text - doesn't layer like ace
  838. background-color: @rp-yellow-for-cm;
  839. color: black;
  840. }
  841. .track-changes-added-marker.track-changes-comment-marker {
  842. background-color: mix(@rp-yellow-for-cm, @rp-green-for-cm);
  843. }
  844. }
  845. .review-icon when (@is-overleaf = false) {
  846. display: inline-block;
  847. background: url('/img/review-icon-sprite.png') top/30px no-repeat;
  848. width: 30px;
  849. &::before {
  850. content: '\00a0'; // Non-breakable space. A non-breakable character here makes this icon work like font-awesome.
  851. }
  852. .toolbar .btn-full-height:hover & {
  853. background-position-y: -30px;
  854. }
  855. .toolbar .btn-full-height.active &,
  856. .toolbar .btn-full-height:active & {
  857. background-position-y: -60px;
  858. }
  859. @media (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
  860. background-image: url('/img/review-icon-sprite@2x.png');
  861. }
  862. }
  863. .review-icon when (@is-overleaf = true) {
  864. display: inline-block;
  865. background: url('/img/review-icon-sprite-ol.png') top/30px no-repeat;
  866. width: 30px;
  867. background-position-y: -30px;
  868. &::before {
  869. content: '\00a0'; // Non-breakable space. A non-breakable character here makes this icon work like font-awesome.
  870. }
  871. @media (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
  872. background-image: url('/img/review-icon-sprite-ol@2x.png');
  873. }
  874. }
  875. .review-icon when (@is-overleaf-light = true) {
  876. background-position-y: 0;
  877. .toolbar .btn-full-height.active &,
  878. .toolbar .btn-full-height:active & {
  879. background-position-y: -30px;
  880. }
  881. }
  882. .resolved-comments-toggle {
  883. font-size: 14px;
  884. color: lighten(@rp-type-blue, 25%);
  885. border: solid 1px @rp-border-grey;
  886. border-radius: 3px;
  887. padding: 0 4px;
  888. display: block;
  889. height: 22px;
  890. width: 22px;
  891. line-height: 1.4;
  892. &:hover,
  893. &:focus {
  894. text-decoration: none;
  895. color: @rp-type-blue;
  896. }
  897. }
  898. .resolved-comments-backdrop {
  899. display: none;
  900. position: fixed;
  901. top: 0;
  902. right: 0;
  903. bottom: 0;
  904. left: 0;
  905. &-visible {
  906. display: block;
  907. }
  908. }
  909. .resolved-comments-dropdown {
  910. display: none;
  911. position: absolute;
  912. width: 300px;
  913. left: -150px;
  914. max-height: ~"calc(100vh - 100px)";
  915. margin-top: @rp-entry-arrow-width * 1.5;
  916. margin-left: 1em;
  917. background-color: @rp-bg-blue;
  918. text-align: left;
  919. align-items: stretch;
  920. justify-content: center;
  921. border-radius: 3px;
  922. box-shadow: 0 0 20px 10px rgba(0, 0, 0, .3);
  923. z-index: 1;
  924. &::before {
  925. content: '';
  926. .triangle(top, @rp-entry-arrow-width * 3, @rp-entry-arrow-width * 1.5, @rp-bg-blue);
  927. top: -@rp-entry-ribbon-width * 2;
  928. left: 50%;
  929. margin-left: -@rp-entry-arrow-width * .75;
  930. }
  931. &-open {
  932. display: flex;
  933. }
  934. }
  935. .resolved-comments-scroller {
  936. flex: 0 0 auto; // Can't use 100% in the flex-basis key here, IE won't account for padding.
  937. width: 100%; // We need to set the width explicitly, as flex-basis won't work.
  938. max-height: ~"calc(100vh - 100px)"; // We also need to explicitly set the max-height, IE won't compute the flex-determined height.
  939. padding: 5px;
  940. overflow-y: auto;
  941. }
  942. .rp-collapse-toggle {
  943. color: @rp-type-blue;
  944. font-weight: @rp-semibold-weight;
  945. &:hover,
  946. &:focus {
  947. color: darken(@rp-type-blue, 5%);
  948. text-decoration: none;
  949. }
  950. }
  951. .rp-in-editor-widgets {
  952. position: absolute;
  953. top: 0;
  954. right: 0;
  955. font-size: 11px;
  956. z-index: 2;
  957. .rp-size-mini & {
  958. right: @review-off-width;
  959. }
  960. .rp-size-expanded &,
  961. .rp-unsupported & {
  962. display: none;
  963. }
  964. }
  965. .rp-track-changes-indicator {
  966. display: block;
  967. padding: 5px 10px;
  968. background-color: rgba(240, 240, 240, 0.9);
  969. color: @rp-type-blue;
  970. text-align: center;
  971. border-bottom-left-radius: 3px;
  972. white-space: nowrap;
  973. &.rp-track-changes-indicator-on-dark {
  974. background-color: rgba(88, 88, 88, .8);
  975. color: #FFF;
  976. &:hover,
  977. &:focus {
  978. background-color: rgba(88, 88, 88, 1);
  979. color: #FFF;
  980. }
  981. }
  982. &:hover,
  983. &:focus {
  984. outline: 0;
  985. text-decoration: none;
  986. background-color: rgba(240, 240, 240, 1);
  987. color: @rp-type-blue;
  988. }
  989. }
  990. .review-panel-toggler {
  991. display: none;
  992. position: absolute;
  993. top: 0;
  994. bottom: 0;
  995. width: 10px;
  996. opacity: 0.5;
  997. color: @rp-highlight-blue;
  998. z-index: 1;
  999. background-color: transparent;
  1000. transition: background 0.1s;
  1001. .rp-size-mini &,
  1002. .rp-size-expanded & {
  1003. display: block;
  1004. }
  1005. .rp-unsupported & {
  1006. display: none;
  1007. }
  1008. .rp-size-expanded & {
  1009. &::after {
  1010. content: "\f105";
  1011. }
  1012. }
  1013. &:hover,
  1014. &:focus {
  1015. color: @rp-highlight-blue;
  1016. background-color: #FFF;
  1017. }
  1018. &::after {
  1019. content: "\f104";
  1020. font-family: FontAwesome;
  1021. line-height: 1;
  1022. -webkit-font-smoothing: antialiased;
  1023. -moz-osx-font-smoothing: grayscale;
  1024. font-size: 16px;
  1025. display: block;
  1026. position: absolute;
  1027. top: 50%;
  1028. width: 100%;
  1029. text-align: center;
  1030. margin-top: -0.5em;
  1031. }
  1032. }
  1033. // Helper class for elements which aren't treated as flex-items by IE10, e.g:
  1034. // * inline items;
  1035. // * unknown elements (elements which aren't standard DOM elements, such as custom element directives)
  1036. .rp-flex-block {
  1037. display: block;
  1038. }