| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858 |
- @import './editor/file-tree.less';
- @import './editor/history.less';
- @import './editor/history-react.less';
- @import './editor/toolbar.less';
- @import './editor/left-menu.less';
- @import './editor/pdf.less';
- @import './editor/error-boundary.less';
- @import './editor/share.less';
- @import './editor/chat.less';
- @import './editor/file-view.less';
- @import './editor/search.less';
- @import './editor/publish-template.less';
- @import './editor/online-users.less';
- @import './editor/hotkeys.less';
- @import './editor/review-panel.less';
- @import './editor/publish-modal.less';
- @import './editor/outline.less';
- @import './editor/logs.less';
- @import './editor/dictionary.less';
- @import './editor/compile-button.less';
- @import './editor/figure-modal.less';
- @import './editor/ide-react.less';
- @ui-layout-toggler-def-height: 50px;
- @ui-resizer-size: 7px;
- @keyframes blink {
- 0% {
- opacity: 0.2;
- }
- 20% {
- opacity: 1;
- }
- 100% {
- opacity: 0.2;
- }
- }
- .editor-menu-icon {
- &.fa {
- width: 1em;
- background: @editor-header-logo-background;
- &::before {
- // Disable the font-awesome icon when in Overleaf by replacing it with a
- // non-breakable space instead (otherwise the browser would render a
- // zero-width element).
- content: '\00a0';
- }
- }
- }
- .full-size {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- }
- .global-alerts {
- height: 0;
- margin-top: 2px;
- text-align: center;
- .alert {
- display: inline-block;
- text-align: left;
- min-width: 400px;
- padding: @global-alerts-padding;
- font-size: 14px;
- margin-bottom: (@line-height-computed / 4);
- position: relative;
- z-index: 20;
- }
- }
- #try-reconnect-now-button {
- margin-left: 20px;
- }
- #synctex-more-info-button {
- margin-left: 20px;
- }
- #ide-body {
- background-color: @pdf-bg;
- .full-size;
- top: @ide-body-top-offset;
- &.ide-history-open {
- top: @ide-body-top-offset + @editor-toolbar-height;
- }
- }
- #editor {
- .full-size;
- }
- .editor-container #editor {
- top: @editor-toolbar-height;
- }
- .editor-container.has-source-toolbar #editor {
- top: 0;
- }
- .pdf-empty,
- .no-history-available,
- .no-file-selection,
- .multi-selection-ongoing {
- &::before {
- .full-size;
- left: 20px;
- content: '';
- background: url(../../../public/img/ol-brand/overleaf-o-grey.svg) center /
- 200px no-repeat;
- opacity: 0.2;
- pointer-events: none;
- }
- }
- .no-history-available,
- .no-file-selection-message,
- .multi-selection-message {
- width: 50%;
- margin: 0 auto;
- text-align: center;
- padding: @line-height-computed 0;
- }
- .faster-compiles-feedback {
- position: absolute;
- bottom: 0;
- right: 0.5rem; // scrollbar
- margin: 1rem;
- padding: 10px;
- .btn {
- margin: 0 0 0 10px;
- }
- .faster-compiles-feedback-options {
- display: inline;
- white-space: nowrap;
- }
- .faster-compiles-feedback-option {
- background: #1d4c82;
- }
- .faster-compiles-feedback-dismiss {
- border: 0;
- margin: 0 0 0 5px;
- color: #1d4c82;
- right: 0;
- top: 0;
- float: right;
- }
- }
- .toolbar-editor {
- height: @editor-toolbar-height;
- background-color: @editor-toolbar-bg;
- padding: 0 5px;
- overflow: hidden;
- position: relative;
- z-index: 10; // Prevent track changes showing over toolbar
- }
- .loading-screen {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- width: 100%;
- height: 100%;
- background-color: #fff;
- }
- .loading-screen-brand-container {
- width: 15%;
- min-width: 200px;
- text-align: center;
- }
- .loading-screen-brand {
- position: relative;
- width: 100%;
- padding-top: @editor-loading-logo-padding-top;
- height: 0;
- background: @editor-loading-logo-background-url no-repeat bottom / 100%;
- &::after {
- content: '';
- position: absolute;
- height: inherit;
- right: 0;
- bottom: 0;
- left: 0;
- background: @editor-loading-logo-foreground-url no-repeat bottom / 100%;
- transition: height 0.5s;
- }
- }
- .loading-screen-label {
- margin: 0;
- padding-top: 1em;
- font-size: 2em;
- color: @gray-dark;
- }
- .loading-screen-ellip {
- animation: blink 1.4s both infinite;
- &:nth-child(2) {
- animation-delay: 0.2s;
- }
- &:nth-child(3) {
- animation-delay: 0.4s;
- }
- }
- .loading-screen-error {
- margin: 0;
- padding-top: 1em;
- color: @state-danger-text;
- }
- .loading-panel {
- .full-size;
- padding-top: 10rem;
- font-family: @font-family-serif;
- text-align: center;
- background-color: #fafafa;
- }
- .loading-panel-file-view {
- background-color: @gray-lightest;
- }
- .error-panel {
- .full-size;
- padding: @line-height-computed;
- background-color: #fafafa;
- .alert {
- max-width: 400px;
- margin: auto;
- }
- }
- .project-name {
- .name {
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- vertical-align: top;
- padding: 6px;
- color: @project-name-color;
- font-weight: 700;
- white-space: nowrap;
- }
- input {
- height: 30px;
- margin-top: 4px;
- text-align: center;
- padding: 6px;
- font-weight: 700;
- max-width: 500px;
- }
- a.rename {
- visibility: hidden;
- display: inline-block;
- color: @project-rename-link-color;
- padding: 5px;
- border-radius: @border-radius-small;
- cursor: pointer;
- &:hover {
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
- color: @project-rename-link-color-hover;
- text-decoration: none;
- }
- }
- &:hover {
- a.rename {
- visibility: visible;
- }
- }
- }
- /**************************************
- Ace
- ***************************************/
- // The internal components of the aceEditor directive
- .ace-editor-wrapper {
- .full-size;
- .undo-conflict-warning {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- z-index: 10;
- }
- .ace-editor-body {
- width: 100%;
- height: 100%;
- }
- .spelling-highlight {
- z-index: 3;
- position: absolute;
- background-image: url(../../../public/img/spellcheck-underline.png);
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
- background-image: url(../../../public/img/spellcheck-underline@2x.png);
- background-size: 5px 4px;
- }
- background-repeat: repeat-x;
- background-position: bottom left;
- }
- .remote-cursor {
- position: absolute;
- border-left: 2px solid transparent;
- // Adds "nubbin" top right of cursor, which inherits the injected color
- &::before {
- content: '';
- position: absolute;
- left: -2px;
- top: -5px;
- height: 5px;
- width: 5px;
- border-top-width: 3px;
- border-right-width: 3px;
- border-bottom-width: 2px;
- border-left-width: 2px;
- border-style: solid;
- border-color: inherit;
- }
- }
- .annotation-label {
- padding: (@line-height-computed / 4) (@line-height-computed / 2);
- font-size: 0.8rem;
- z-index: 100;
- font-family: @font-family-sans-serif;
- color: white;
- font-weight: 700;
- white-space: nowrap;
- }
- .annotation {
- position: absolute;
- z-index: 2;
- }
- .highlights-before-label,
- .highlights-after-label {
- position: absolute;
- right: @line-height-computed;
- z-index: 1;
- }
- .highlights-before-label {
- top: @line-height-computed / 2;
- }
- .highlights-after-label {
- bottom: @line-height-computed / 2;
- }
- }
- .strike-through-foreground::after {
- content: '';
- position: absolute;
- width: 100%;
- top: 50%;
- margin-top: -1px;
- height: 2px;
- background: currentColor;
- }
- // Hack to solve an issue where scrollbars aren't visible in Safari.
- // Safari seems to clip part of the scrollbar element. By giving the
- // element a background, we're telling Safari that it *really* needs to
- // paint the whole area. See https://github.com/ajaxorg/ace/issues/2872
- .ace_scrollbar-inner {
- background-color: #fff;
- opacity: 0.01;
- .ace_dark & {
- background-color: #000;
- }
- }
- /**************************************
- CodeMirror
- ***************************************/
- .cm-editor-wrapper {
- position: relative;
- height: 100%;
- }
- .cm-editor-body {
- height: 100%;
- }
- // CM (for some reason) has height set to 300px in it's stylesheet
- .CodeMirror {
- height: 100%;
- }
- .ui-layout-resizer {
- width: @ui-resizer-size !important;
- background-color: @editor-resizer-bg-color;
- /* Over-ride z-index set on element by JQuery Layout */
- z-index: 0 !important;
- &.ui-layout-resizer-closed {
- &::before,
- &::after {
- content: none;
- }
- }
- &::before,
- &::after {
- content: '\2847';
- display: block;
- position: absolute;
- text-align: center;
- left: -2px;
- -webkit-font-smoothing: antialiased;
- width: 100%;
- font-size: 24px;
- top: 25%;
- color: @ol-blue-gray-2;
- }
- &::after {
- top: 75%;
- }
- }
- .ui-layout-toggler {
- display: none !important;
- }
- .custom-toggler {
- position: absolute;
- display: flex;
- align-items: center;
- justify-content: center;
- width: @ui-resizer-size !important;
- height: 50px;
- margin-top: -25px;
- top: 50%;
- background-color: @editor-toggler-bg-color;
- &:hover,
- &:focus {
- outline: none;
- text-decoration: none;
- }
- // Increase hit area
- &::before {
- content: '';
- display: block;
- position: absolute;
- top: 0;
- right: -3px;
- bottom: 0;
- left: -3px;
- }
- &::after {
- font-family: FontAwesome;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- font-size: 65%;
- font-weight: bold;
- color: #fff;
- user-select: none;
- pointer-events: none;
- }
- &:hover {
- background-color: @editor-toggler-hover-bg-color;
- }
- }
- .custom-toggler-east::after {
- content: '\f105';
- }
- .custom-toggler-west::after {
- content: '\f104';
- }
- .custom-toggler-closed.custom-toggler-east::after {
- content: '\f104';
- }
- .custom-toggler-closed.custom-toggler-west::after {
- content: '\f105';
- }
- .ui-layout-resizer-dragging {
- background-color: @editor-resizer-bg-color-dragging;
- z-index: 1000 !important;
- }
- .context-menu {
- position: fixed;
- z-index: 100;
- }
- .editor-dark {
- color: @gray-lighter;
- background-color: @editor-dark-background-color;
- .ui-layout-resizer {
- background-color: darken(@editor-dark-background-color, 10%);
- border: none;
- }
- .btn-default {
- color: white;
- background-color: @gray;
- border-color: darken(@gray-dark, 10%);
- &:hover {
- background-color: darken(@gray, 5%);
- border-color: darken(@gray-dark, 20%);
- }
- }
- }
- .modal-alert {
- margin-top: 10px;
- margin-bottom: 0px;
- }
- // vertically centre the "connection down" modal so it does not hide
- // the reconnecting indicator
- .modal.lock-editor-modal {
- display: flex !important;
- background-color: rgba(0, 0, 0, 0.3);
- overflow-y: hidden;
- pointer-events: none;
- .modal-dialog {
- top: @line-height-computed;
- }
- }
- .out-of-sync-modal {
- .text-preview {
- margin-top: @line-height-computed / 2;
- .scroll-container {
- max-height: 360px;
- width: 100%;
- background-color: white;
- font-size: 0.8em;
- line-height: 1.1em;
- overflow: auto;
- border: 1px solid @gray-lighter;
- padding-left: 12px;
- padding-right: 12px;
- padding-top: 8px;
- padding-bottom: 8px;
- text-align: left;
- white-space: pre;
- font-family: monospace;
- }
- }
- }
- .sl_references_search_hint {
- position: relative;
- top: 100%;
- }
- .sl_references_search_hint {
- position: relative;
- left: -1px;
- text-align: center;
- padding: 2px;
- background: rgb(202, 214, 250);
- border: 1px solid lightgray;
- box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
- span {
- color: black;
- }
- }
- .bibtex-hint-banner,
- .references-search-banner {
- position: absolute;
- top: 8px;
- right: 8px;
- left: 8px;
- z-index: 1000;
- display: flex;
- justify-content: space-between;
- padding: 5px 10px;
- }
- .references-search-banner {
- align-items: center;
- }
- .bibtex-hint-banner {
- align-items: flex-start;
- .bibtex-hint-close {
- color: inherit;
- margin-left: 10px;
- font-size: 24px;
- padding: 0;
- line-height: 1;
- border-radius: 0;
- &,
- &:hover,
- &:focus,
- &:active {
- background-color: transparent;
- }
- }
- }
- // -- References Search Modal --
- .references-search-modal-backdrop {
- // don't grey out the editor when the
- // modal is active
- background-color: transparent;
- }
- .references-search-modal {
- // upgrade prompt
- .references-search-upgrade-prompt {
- padding: 24px;
- padding-bottom: 48px;
- .upgrade-prompt {
- text-align: center;
- width: 400px;
- padding-top: 14px;
- padding-bottom: 14px;
- padding-left: 38px;
- padding-right: 38px;
- margin: auto;
- background: white;
- opacity: 0.95;
- border-radius: 8px;
- .message {
- margin-top: 15px;
- &.call-to-action {
- font-weight: bold;
- }
- ul.list-unstyled {
- text-align: left;
- }
- }
- a.btn {
- opacity: 1;
- }
- }
- }
- .search-form {
- // position the spinner inside the input element
- i.fa-spinner {
- margin-top: -30px;
- }
- }
- .alert-danger {
- margin-top: 12px;
- margin-bottom: 0px;
- }
- // search result items list
- .search-results {
- font-size: 12px;
- .no-results-message,
- .too-many-results-message {
- font-size: 16px;
- }
- .search-results-scroll-container {
- max-height: calc(100vh - 225px);
- overflow-y: auto;
- }
- .search-result-hit {
- &:hover {
- cursor: pointer;
- }
- border-bottom: 1px solid #ddd;
- padding: 8px;
- &:last-child {
- border-bottom: 1px solid transparent;
- }
- border-left: 4px solid transparent;
- &.selected-search-result-hit {
- color: @brand-success;
- }
- .hit-title {
- font-size: 1.3em;
- font-style: italic;
- }
- }
- }
- }
- .referencesImportModal {
- .referencesImportPreviewScroller {
- font-family: monospace;
- font-size: 0.8em;
- max-height: 360px;
- overflow: scroll;
- white-space: pre;
- padding: 8px 12px;
- margin-bottom: 15px;
- border: 1px solid @gray-lighter;
- background-color: @gray-lightest;
- }
- }
- .teaser-title,
- .dropbox-teaser-title {
- margin-top: 0;
- text-align: center;
- }
- .teaser-refresh-label {
- text-align: center;
- }
- .teaser-img,
- .dropbox-teaser-img {
- .img-responsive;
- margin-bottom: 5px;
- }
- .teaser-video-container,
- .dropbox-teaser-video-container {
- margin-top: -@modal-inner-padding;
- margin-left: -@modal-inner-padding;
- margin-right: -@modal-inner-padding;
- margin-bottom: 5px;
- overflow: hidden;
- }
- .teaser-video,
- .dropbox-teaser-video {
- width: 100%;
- height: auto;
- border-bottom: 1px solid @modal-header-border-color;
- }
- .spell-check-menu {
- > .dropdown-menu > li > a {
- padding: 2px 15px;
- }
- }
- .spell-check-menu-from-bottom {
- > .dropdown-menu {
- top: auto;
- bottom: 100%;
- }
- }
- // The source editor container is managed by jQuery's UI layout library, which adds an `overflow: hidden`
- // rule to it. This is problematic because we need overflowing content to be visible (the review panel
- // previews are shown on hover, visually outside the source editor container). As the `overflow: hidden`
- // rule is added automatically (inline and not configurable), the only workaround is to use `!important`.
- .editor-container {
- overflow: visible !important;
- }
- .pdf-preview-messages {
- position: absolute;
- right: @margin-sm;
- left: @margin-sm;
- top: @margin-xl;
- z-index: @zindex-popover;
- }
- .compile-time-warning {
- padding: @padding-sm;
- background-color: @ol-green;
- width: 420px;
- box-shadow: 5px 5px 6px rgba(0, 0, 0, 0.3);
- .warning-content {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-right: 32px;
- }
- .warning-text {
- max-width: 300px;
- padding-right: @alert-padding;
- display: inline-block;
- font-size: @font-size-small;
- }
- .upgrade-prompt {
- display: inline-flex;
- }
- button.btn {
- background-color: @ol-darker-green;
- &.close {
- background-color: @ol-green;
- }
- }
- }
- .cm6-switch-away-survey {
- padding: @padding-sm;
- box-shadow: 5px 5px 6px rgba(0, 0, 0, 0.3);
- background-color: @ol-blue;
- width: 530px;
- position: absolute;
- right: @margin-sm;
- bottom: @margin-xl;
- z-index: @zindex-popover;
- .btn.close {
- background-color: transparent;
- color: #fff;
- opacity: 1;
- }
- .warning-content {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-right: 32px;
- }
- .warning-text {
- padding-right: @alert-padding;
- display: inline-block;
- font-size: @font-size-small;
- }
- }
- .legacy-editor-warning {
- width: 500px;
- &.alert.alert-info {
- padding: @padding-sm;
- }
- .btn.close {
- background-color: transparent;
- color: @white;
- opacity: 1;
- }
- .warning-content {
- padding-right: @alert-padding;
- font-size: @font-size-small;
- margin-right: 32px;
- .warning-link {
- font-weight: 700;
- text-decoration: none;
- &:hover {
- text-decoration: underline;
- }
- }
- }
- }
- grammarly-extension[data-grammarly-shadow-root='true'] {
- z-index: 1;
- }
|