review-panel.less 22 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178
  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 {
  866. display: inline-block;
  867. background: url('/img/review-icon-sprite-ol.png') top/30px no-repeat;
  868. width: 30px;
  869. background-position-y: -30px;
  870. &::before {
  871. content: '\00a0'; // Non-breakable space. A non-breakable character here makes this icon work like font-awesome.
  872. }
  873. @media (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
  874. background-image: url('/img/review-icon-sprite-ol@2x.png');
  875. }
  876. }
  877. .review-icon when (@is-overleaf-light = true) {
  878. background-position-y: 0;
  879. .toolbar .btn-full-height.active &,
  880. .toolbar .btn-full-height:active & {
  881. background-position-y: -30px;
  882. }
  883. }
  884. .resolved-comments-toggle {
  885. font-size: 14px;
  886. color: lighten(@rp-type-blue, 25%);
  887. border: solid 1px @rp-border-grey;
  888. border-radius: 3px;
  889. padding: 0 4px;
  890. display: block;
  891. height: 22px;
  892. width: 22px;
  893. line-height: 1.4;
  894. &:hover,
  895. &:focus {
  896. text-decoration: none;
  897. color: @rp-type-blue;
  898. }
  899. }
  900. .resolved-comments-backdrop {
  901. display: none;
  902. position: fixed;
  903. top: 0;
  904. right: 0;
  905. bottom: 0;
  906. left: 0;
  907. &-visible {
  908. display: block;
  909. }
  910. }
  911. .resolved-comments-dropdown {
  912. display: none;
  913. position: absolute;
  914. width: 300px;
  915. left: -150px;
  916. max-height: ~'calc(100vh - 100px)';
  917. margin-top: @rp-entry-arrow-width * 1.5;
  918. margin-left: 1em;
  919. background-color: @rp-bg-blue;
  920. text-align: left;
  921. align-items: stretch;
  922. justify-content: center;
  923. border-radius: 3px;
  924. box-shadow: 0 0 20px 10px rgba(0, 0, 0, 0.3);
  925. z-index: 1;
  926. &::before {
  927. content: '';
  928. .triangle(
  929. top,
  930. @rp-entry-arrow-width * 3,
  931. @rp-entry-arrow-width * 1.5,
  932. @rp-bg-blue
  933. );
  934. top: -@rp-entry-ribbon-width * 2;
  935. left: 50%;
  936. margin-left: -@rp-entry-arrow-width * 0.75;
  937. }
  938. &-open {
  939. display: flex;
  940. }
  941. }
  942. .resolved-comments-scroller {
  943. flex: 0 0 auto; // Can't use 100% in the flex-basis key here, IE won't account for padding.
  944. width: 100%; // We need to set the width explicitly, as flex-basis won't work.
  945. max-height: ~'calc(100vh - 100px)'; // We also need to explicitly set the max-height, IE won't compute the flex-determined height.
  946. padding: 5px;
  947. overflow-y: auto;
  948. }
  949. .rp-collapse-toggle {
  950. color: @rp-type-blue;
  951. font-weight: @rp-semibold-weight;
  952. &:hover,
  953. &:focus {
  954. color: darken(@rp-type-blue, 5%);
  955. text-decoration: none;
  956. }
  957. }
  958. .rp-in-editor-widgets {
  959. position: absolute;
  960. top: 0;
  961. right: 0;
  962. font-size: 11px;
  963. z-index: 2;
  964. .rp-size-mini & {
  965. right: @review-off-width;
  966. }
  967. .rp-size-expanded &,
  968. .rp-unsupported & {
  969. display: none;
  970. }
  971. }
  972. .rp-track-changes-indicator {
  973. display: block;
  974. padding: 5px 10px;
  975. background-color: rgba(240, 240, 240, 0.9);
  976. color: @rp-type-blue;
  977. text-align: center;
  978. border-bottom-left-radius: 3px;
  979. white-space: nowrap;
  980. &.rp-track-changes-indicator-on-dark {
  981. background-color: rgba(88, 88, 88, 0.8);
  982. color: #fff;
  983. &:hover,
  984. &:focus {
  985. background-color: rgba(88, 88, 88, 1);
  986. color: #fff;
  987. }
  988. }
  989. &:hover,
  990. &:focus {
  991. outline: 0;
  992. text-decoration: none;
  993. background-color: rgba(240, 240, 240, 1);
  994. color: @rp-type-blue;
  995. }
  996. }
  997. .review-panel-toggler {
  998. display: none;
  999. position: absolute;
  1000. top: 0;
  1001. bottom: 0;
  1002. width: 10px;
  1003. opacity: 0.5;
  1004. color: @rp-highlight-blue;
  1005. z-index: 1;
  1006. background-color: transparent;
  1007. transition: background 0.1s;
  1008. .rp-size-mini &,
  1009. .rp-size-expanded & {
  1010. display: block;
  1011. }
  1012. .rp-unsupported & {
  1013. display: none;
  1014. }
  1015. .rp-size-expanded & {
  1016. &::after {
  1017. content: '\f105';
  1018. }
  1019. }
  1020. &:hover,
  1021. &:focus {
  1022. color: @rp-highlight-blue;
  1023. background-color: #fff;
  1024. }
  1025. &::after {
  1026. content: '\f104';
  1027. font-family: FontAwesome;
  1028. line-height: 1;
  1029. -webkit-font-smoothing: antialiased;
  1030. -moz-osx-font-smoothing: grayscale;
  1031. font-size: 16px;
  1032. display: block;
  1033. position: absolute;
  1034. top: 50%;
  1035. width: 100%;
  1036. text-align: center;
  1037. margin-top: -0.5em;
  1038. }
  1039. }
  1040. // Helper class for elements which aren't treated as flex-items by IE10, e.g:
  1041. // * inline items;
  1042. // * unknown elements (elements which aren't standard DOM elements, such as custom element directives)
  1043. .rp-flex-block {
  1044. display: block;
  1045. }