editor.less 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. @import "./editor/file-tree.less";
  2. @import "./editor/history.less";
  3. @import "./editor/toolbar.less";
  4. @import "./editor/left-menu.less";
  5. @import "./editor/pdf.less";
  6. @import "./editor/enago.less";
  7. @import "./editor/share.less";
  8. @import "./editor/chat.less";
  9. @import "./editor/binary-file.less";
  10. @import "./editor/search.less";
  11. @import "./editor/publish-template.less";
  12. @import "./editor/online-users.less";
  13. @import "./editor/hotkeys.less";
  14. @import "./editor/review-panel.less";
  15. @import "./editor/rich-text.less";
  16. @import "./editor/publish-modal.less";
  17. @ui-layout-toggler-def-height: 50px;
  18. @ui-resizer-size: 7px;
  19. @keyframes blink {
  20. 0% {
  21. opacity: 0.2;
  22. }
  23. 20% {
  24. opacity: 1;
  25. }
  26. 100% {
  27. opacity: 0.2;
  28. }
  29. }
  30. .editor-menu-icon when (@is-overleaf = true) {
  31. &.fa {
  32. width: 1em;
  33. background: url(/img/ol-brand/overleaf-o-white.svg) center / contain no-repeat;
  34. &::before {
  35. // Disable the font-awesome icon when in Overleaf by replacing it with a
  36. // non-breakable space instead (otherwise the browser would render a
  37. // zero-width element).
  38. content: "\00a0";
  39. }
  40. }
  41. }
  42. .full-size {
  43. position: absolute;
  44. top: 0;
  45. bottom: 0;
  46. left: 0;
  47. right: 0;
  48. }
  49. .global-alerts {
  50. height: 0;
  51. margin-top: 2px;
  52. text-align: center;
  53. .alert {
  54. display: inline-block;
  55. text-align: left;
  56. min-width: 400px;
  57. padding: @global-alerts-padding;
  58. font-size: 14px;
  59. margin-bottom: (@line-height-computed / 4);
  60. position: relative;
  61. z-index: 20;
  62. }
  63. }
  64. #try-reconnect-now-button {
  65. margin-left: 20px;
  66. }
  67. #ide-body {
  68. .full-size;
  69. top: 40px;
  70. }
  71. #editor, #editor-rich-text {
  72. .full-size;
  73. }
  74. #editor-rich-text {
  75. top: @editor-toolbar-height;
  76. }
  77. .toolbar-editor {
  78. height: @editor-toolbar-height;
  79. background-color: @editor-toolbar-bg;
  80. }
  81. .loading-screen {
  82. display: flex;
  83. flex-direction: column;
  84. justify-content: center;
  85. align-items: center;
  86. width: 100%;
  87. height: 100%;
  88. background-color: #FFF;
  89. }
  90. .loading-screen-brand-container {
  91. width: 15%;
  92. min-width: 200px;
  93. text-align: center;
  94. }
  95. .loading-screen-brand {
  96. position: relative;
  97. width: 100%;
  98. padding-top: @editor-loading-logo-padding-top;
  99. height: 0;
  100. background: @editor-loading-logo-background-url no-repeat bottom / 100%;
  101. &::after {
  102. content: '';
  103. position: absolute;
  104. height: inherit;
  105. right: 0;
  106. bottom: 0;
  107. left: 0;
  108. background: @editor-loading-logo-foreground-url no-repeat bottom / 100%;
  109. transition: height .5s;
  110. }
  111. }
  112. .loading-screen-label {
  113. margin: 0;
  114. padding-top: 1em;
  115. font-size: 2em;
  116. color: @gray-dark;
  117. }
  118. .loading-screen-ellip {
  119. animation: blink 1.4s both infinite;
  120. &:nth-child(2) {
  121. animation-delay: 0.2s;
  122. }
  123. &:nth-child(3) {
  124. animation-delay: 0.4s;
  125. }
  126. }
  127. .loading-screen-error {
  128. margin: 0;
  129. padding-top: 1em;
  130. color: @state-danger-text;
  131. }
  132. .loading-panel {
  133. .full-size;
  134. padding-top: 10rem;
  135. font-family: @font-family-serif;
  136. text-align: center;
  137. background-color: #fafafa;
  138. }
  139. .error-panel {
  140. .full-size;
  141. padding: @line-height-computed;
  142. background-color: #fafafa;
  143. .alert {
  144. max-width: 400px;
  145. margin: auto;
  146. }
  147. }
  148. .project-name {
  149. .name {
  150. display: inline-block;
  151. max-width: 250px;
  152. overflow: hidden;
  153. text-overflow: ellipsis;
  154. vertical-align: top;
  155. padding: 6px;
  156. color: @project-name-color;
  157. font-weight: 700;
  158. white-space: nowrap;
  159. }
  160. input {
  161. height: 30px;
  162. margin-top: 4px;
  163. text-align: center;
  164. padding: 6px;
  165. font-weight: 700;
  166. }
  167. a.rename {
  168. visibility: hidden;
  169. display: inline-block;
  170. color: @project-rename-link-color;
  171. padding: 5px;
  172. border-radius: @border-radius-small;
  173. &:hover {
  174. text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  175. color: @project-rename-link-color-hover;
  176. text-decoration: none;
  177. }
  178. }
  179. &:hover {
  180. a.rename {
  181. visibility: visible;
  182. }
  183. }
  184. }
  185. .cm-editor-wrapper {
  186. height: 100%;
  187. .CodeMirror {
  188. height: 100%;
  189. }
  190. }
  191. // The internal components of the aceEditor directive
  192. .ace-editor-wrapper {
  193. .full-size;
  194. .undo-conflict-warning {
  195. position: absolute;
  196. top: 0;
  197. right: 0;
  198. left: 0;
  199. z-index: 10;
  200. }
  201. .ace-editor-body {
  202. width: 100%;
  203. height: 100%;
  204. }
  205. .spelling-highlight {
  206. position: absolute;
  207. background-image: url(/img/spellcheck-underline.png);
  208. @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  209. background-image: url(/img/spellcheck-underline@2x.png);
  210. background-size: 5px 4px;
  211. }
  212. background-repeat: repeat-x;
  213. background-position: bottom left;
  214. }
  215. .remote-cursor {
  216. position: absolute;
  217. border-left: 2px solid transparent;
  218. .nubbin {
  219. height: 5px;
  220. width: 5px;
  221. position: absolute;
  222. left: -2px;
  223. }
  224. }
  225. .annotation-label {
  226. padding: (@line-height-computed / 4) (@line-height-computed / 2);
  227. font-size: 0.8rem;
  228. z-index: 100;
  229. font-family: @font-family-sans-serif;
  230. color: white;
  231. font-weight: 700;
  232. white-space: nowrap;
  233. }
  234. .annotation {
  235. position: absolute;
  236. z-index: 2;
  237. }
  238. .highlights-before-label, .highlights-after-label {
  239. position: absolute;
  240. right: @line-height-computed;
  241. z-index: 1;
  242. }
  243. .highlights-before-label {
  244. top: @line-height-computed / 2;
  245. }
  246. .highlights-after-label {
  247. bottom: @line-height-computed / 2;
  248. }
  249. }
  250. // Hack to solve an issue where scrollbars aren't visible in Safari.
  251. // Safari seems to clip part of the scrollbar element. By giving the
  252. // element a background, we're telling Safari that it *really* needs to
  253. // paint the whole area. See https://github.com/ajaxorg/ace/issues/2872
  254. .ace_scrollbar-inner {
  255. background-color: #FFF;
  256. opacity: 0.01;
  257. .ace_dark & {
  258. background-color: #000;
  259. }
  260. }
  261. .ui-layout-resizer when (@is-overleaf = false) {
  262. width: 6px;
  263. background-color: @editor-resizer-bg-color;
  264. border-left: 1px solid @editor-border-color;
  265. border-right: 1px solid @editor-border-color;
  266. .ui-layout-toggler {
  267. color: #999;
  268. font-family: FontAwesome;
  269. font-style: normal;
  270. font-weight: normal;
  271. line-height: 1;
  272. -webkit-font-smoothing: antialiased;
  273. -moz-osx-font-smoothing: grayscale;
  274. font-size: 16px !important;
  275. line-height: 50px;
  276. background-color: @editor-toggler-bg-color;
  277. &:hover {
  278. background-color: @editor-toggler-hover-bg-color;
  279. color: #333;
  280. }
  281. }
  282. }
  283. .ui-layout-resizer when (@is-overleaf = true) {
  284. width: @ui-resizer-size !important;
  285. background-color: @editor-resizer-bg-color;
  286. &.ui-layout-resizer-closed {
  287. &::before,
  288. &::after {
  289. content: none;
  290. }
  291. }
  292. &::before,
  293. &::after {
  294. content: '\2847';
  295. display: block;
  296. position: absolute;
  297. text-align: center;
  298. left: -2px;
  299. -webkit-font-smoothing: antialiased;
  300. width: 100%;
  301. font-size: 24px;
  302. top: 25%;
  303. color: @ol-blue-gray-2;
  304. }
  305. &::after {
  306. top: 75%;
  307. }
  308. }
  309. .ui-layout-resizer-west.ui-layout-resizer-open, .ui-layout-resizer-east.ui-layout-resizer-closed {
  310. .ui-layout-toggler when (@is-overleaf = false) {
  311. &:before {
  312. content: "\f104"
  313. }
  314. }
  315. }
  316. .ui-layout-resizer-east.ui-layout-resizer-open, .ui-layout-resizer-west.ui-layout-resizer-closed {
  317. .ui-layout-toggler when (@is-overleaf = false) {
  318. &:before {
  319. content: "\f105"
  320. }
  321. }
  322. }
  323. .ui-layout-toggler when (@is-overleaf = true) {
  324. display: none !important;
  325. }
  326. .custom-toggler when (@is-overleaf = true) {
  327. position: absolute;
  328. display: flex;
  329. align-items: center;
  330. justify-content: center;
  331. width: @ui-resizer-size !important;;
  332. height: 50px;
  333. margin-top: -25px;
  334. top: 50%;
  335. z-index: 6;
  336. background-color: @editor-toggler-bg-color;
  337. &:hover,
  338. &:focus {
  339. outline: none;
  340. text-decoration: none;
  341. }
  342. // Increase hit area
  343. &::before {
  344. content: '';
  345. display: block;
  346. position: absolute;
  347. top: 0;
  348. right: -3px;
  349. bottom: 0;
  350. left: -3px;
  351. }
  352. &::after {
  353. font-family: FontAwesome;
  354. -webkit-font-smoothing: antialiased;
  355. -moz-osx-font-smoothing: grayscale;
  356. font-size: 65%;
  357. font-weight: bold;
  358. color: #FFF;
  359. user-select: none;
  360. pointer-events: none;
  361. }
  362. &:hover {
  363. background-color: @editor-toggler-hover-bg-color;
  364. }
  365. }
  366. .custom-toggler-east::after {
  367. content: '\f105';
  368. }
  369. .custom-toggler-west::after {
  370. content: '\f104';
  371. }
  372. .custom-toggler-closed.custom-toggler-east::after {
  373. content: '\f104';
  374. }
  375. .custom-toggler-closed.custom-toggler-west::after {
  376. content: '\f105';
  377. }
  378. .ui-layout-resizer-dragging {
  379. background-color: @editor-resizer-bg-color-dragging;
  380. }
  381. .context-menu {
  382. position: fixed;
  383. z-index: 100;
  384. }
  385. .editor-dark {
  386. color: @gray-lighter;
  387. background-color: @editor-dark-background-color;
  388. .ui-layout-resizer {
  389. background-color: darken(@editor-dark-background-color, 10%);
  390. border: none;
  391. }
  392. .btn-default {
  393. color: white;
  394. background-color: @gray;
  395. border-color: darken(@gray-dark, 10%);
  396. &:hover {
  397. background-color: darken(@gray, 5%);
  398. border-color: darken(@gray-dark, 20%);
  399. }
  400. }
  401. }
  402. .modal-alert {
  403. margin-top:10px;
  404. margin-bottom:0px;
  405. }
  406. // vertically centre the "connection down" modal so it does not hide
  407. // the reconnecting indicator
  408. .modal.lock-editor-modal {
  409. display: flex !important;
  410. .modal-dialog {
  411. margin: auto;
  412. }
  413. }
  414. .sl_references_search_hint-varDefault {
  415. position: absolute;
  416. bottom: -22px;
  417. left: -1px;
  418. right: 0px;
  419. text-align: center;
  420. padding: 2px;
  421. background: rgb(202, 214, 250);
  422. border: 1px solid lightgray;
  423. box-shadow: 3px 3px 5px rgba(0,0,0,.2);
  424. span {
  425. color: black;
  426. }
  427. }
  428. .sl_references_search_hint-varButton {
  429. position: absolute;
  430. bottom: -65px;
  431. left: -1px;
  432. right: 0px;
  433. padding: 0 6px 6px;
  434. text-align: center;
  435. background: #fbfbfb;
  436. color: #FFF;
  437. box-shadow: 3px 3px 5px rgba(0,0,0,.2);
  438. border-left: 1px solid lightgray;
  439. font-family: @font-family-sans-serif;
  440. font-size: 13px;
  441. font-weight: 600;
  442. hr {
  443. margin: 6px -6px;
  444. }
  445. button {
  446. width: 100%;
  447. font-size: inherit;
  448. line-height: 1.4;
  449. }
  450. span {
  451. padding-left: 10px;
  452. }
  453. kbd {
  454. display: block;
  455. font-family: inherit;
  456. font-size: 12px;
  457. font-weight: normal;
  458. }
  459. }
  460. // -- References Search Modal --
  461. .references-search-modal-backdrop {
  462. // don't grey out the editor when the
  463. // modal is active
  464. background-color: transparent;
  465. }
  466. .references-search-modal {
  467. // upgrade prompt
  468. .references-search-upgrade-prompt {
  469. padding: 24px;
  470. padding-bottom: 48px;
  471. .upgrade-prompt {
  472. text-align: center;
  473. width: 400px;
  474. padding-top: 14px;
  475. padding-bottom: 14px;
  476. padding-left: 38px;
  477. padding-right: 38px;
  478. margin: auto;
  479. background: white;
  480. opacity: 0.95;
  481. border-radius: 8px;
  482. .message {
  483. margin-top: 15px;
  484. &.call-to-action {
  485. font-weight: bold;
  486. }
  487. ul.list-unstyled {
  488. text-align: left;
  489. }
  490. }
  491. a.btn {
  492. opacity: 1.0;
  493. }
  494. }
  495. }
  496. .search-form {
  497. // position the spinner inside the input element
  498. i.fa-spinner {
  499. margin-top: -30px;
  500. }
  501. }
  502. .alert-danger {
  503. margin-top: 12px;
  504. margin-bottom: 0px;
  505. }
  506. // search result items list
  507. .search-results {
  508. font-size: 12px;
  509. .no-results-message {
  510. font-size: 16px;
  511. }
  512. .search-result-hit {
  513. &:hover {
  514. cursor: pointer;
  515. }
  516. border-bottom: 1px solid #ddd;
  517. padding: 8px;
  518. &:last-child {
  519. border-bottom: 1px solid transparent;
  520. }
  521. border-left: 4px solid transparent;
  522. &.selected-search-result-hit {
  523. background-color: @red;
  524. color: white;
  525. .hit-year.small {
  526. color: white;
  527. }
  528. .hit-journal.small {
  529. color: white;
  530. }
  531. }
  532. .hit-title {
  533. font-size: 1.3em;
  534. font-style: italic;
  535. }
  536. }
  537. }
  538. }
  539. .referencesImportModal {
  540. .referencesImportPreview {
  541. margin-top: 15px;
  542. .referencesImportPreviewScroller {
  543. font-family: monospace;
  544. font-size: 0.8em;
  545. max-height: 360px;
  546. overflow: scroll;
  547. white-space: pre;
  548. padding: 8px 12px;
  549. margin-bottom: 15px;
  550. border: 1px solid @gray-lighter;
  551. background-color: @gray-lightest;
  552. }
  553. }
  554. }
  555. .teaser-title,
  556. .dropbox-teaser-title {
  557. margin-top: 0;
  558. text-align: center;
  559. }
  560. .teaser-img,
  561. .dropbox-teaser-img {
  562. .img-responsive;
  563. margin-bottom: 5px;
  564. }
  565. .teaser-video-container,
  566. .dropbox-teaser-video-container {
  567. margin-top: -@modal-inner-padding;
  568. margin-left: -@modal-inner-padding;
  569. margin-right: -@modal-inner-padding;
  570. margin-bottom: 5px;
  571. overflow: hidden;
  572. }
  573. .teaser-video,
  574. .dropbox-teaser-video {
  575. width: 100%;
  576. height: auto;
  577. border-bottom: 1px solid @modal-header-border-color;
  578. }