X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/13f8f39dd5b77644839c092d10a0ad549b19600a..refs/pull/5313/head:/resources/sass/_editor.scss diff --git a/resources/sass/_editor.scss b/resources/sass/_editor.scss index 4ffff3cc0..b33cb4d05 100644 --- a/resources/sass/_editor.scss +++ b/resources/sass/_editor.scss @@ -26,12 +26,16 @@ body.editor-is-fullscreen { } } .editor-content-area { + min-height: 100%; + padding-block: 1rem; &:focus { outline: 0; } } .editor-content-wrap { + position: relative; overflow-y: scroll; + flex: 1; } // Buttons @@ -59,10 +63,28 @@ body.editor-is-fullscreen { background-color: #ceebff; color: #000; } +.editor-button-long { + display: flex !important; + flex-direction: row; + align-items: center; + justify-content: start; + gap: .5rem; +} +.editor-button-text { + font-weight: 400; + color: #000; + font-size: 14px; + flex: 1; + padding-inline-end: 4px; +} .editor-button-format-preview { padding: 4px 6px; display: block; } +.editor-button-long .editor-button-icon { + width: 24px; + height: 24px; +} .editor-button-icon svg { width: 24px; height: 24px; @@ -70,6 +92,41 @@ body.editor-is-fullscreen { fill: currentColor; display: block; } +.editor-menu-button-icon { + width: 24px; + height: 24px; + svg { + fill: #888; + } +} +.editor-container[dir="rtl"] .editor-menu-button-icon { + rotate: 180deg; +} +.editor-button-with-menu-container { + display: flex; + flex-direction: row; + gap: 0; + align-items: stretch; + border-radius: 4px; + .editor-dropdown-menu-container { + display: flex; + } + .editor-dropdown-menu-container > .editor-dropdown-menu { + top: 100%; + } + .editor-dropdown-menu-container > .editor-button { + padding-inline: 4px; + margin-inline-start: -3px; + svg { + width: 12px; + height: 12px; + } + } + &:hover { + outline: 1px solid #DDD; + outline-offset: -3px; + } +} // Containers .editor-dropdown-menu-container { @@ -80,30 +137,37 @@ body.editor-is-fullscreen { background-color: #FFF; box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.15); z-index: 99; - min-width: 120px; display: flex; flex-direction: row; } -.editor-menu-list { +.editor-dropdown-menu-vertical { display: flex; flex-direction: column; align-items: stretch; + min-width: 160px; } -.editor-menu-list .editor-button { +.editor-dropdown-menu-vertical .editor-button { border-bottom: 0; text-align: start; display: block; width: 100%; } -.editor-menu-list > .editor-dropdown-menu-container .editor-dropdown-menu { +.editor-dropdown-menu-vertical > .editor-dropdown-menu-container .editor-dropdown-menu { inset-inline-start: 100%; top: 0; - flex-direction: column; +} + +.editor-separator { + display: block; + height: 1px; + background-color: #DDD; + opacity: .8; } .editor-format-menu-toggle { width: 130px; height: 32px; + font-size: 13px; overflow: hidden; padding-inline: 12px; justify-content: start; @@ -112,11 +176,17 @@ body.editor-is-fullscreen { background-position: 98% 50%; background-size: 28px; } +.editor-container[dir="rtl"] .editor-format-menu-toggle { + background-position: 2% 50%; +} .editor-format-menu .editor-dropdown-menu { min-width: 300px; .editor-dropdown-menu { min-width: 220px; } + .editor-button-icon { + display: none; + } } .editor-format-menu .editor-dropdown-menu .editor-dropdown-menu-container > .editor-button { padding: 8px 10px; @@ -222,6 +292,9 @@ body.editor-is-fullscreen { width: 28px; height: 28px; cursor: pointer; + display: flex; + align-items: center; + justify-content: center; } .editor-color-select-option:hover { border-radius: 3px; @@ -229,6 +302,11 @@ body.editor-is-fullscreen { z-index: 3; box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.25); } +.editor-color-select-option[data-color=""] svg { + width: 20px; + height: 20px; + fill: #888; +} .editor-table-creator-row { display: flex; } @@ -251,23 +329,21 @@ body.editor-is-fullscreen { position: relative; display: inline-flex; } -.editor-image-decorator { +.editor-node-resizer { position: absolute; left: 0; - right: 0; - width: 100%; - height: 100%; + right: auto; display: inline-block; - &.selected { - border: 1px dashed var(--editor-color-primary); - } + outline: 2px dashed var(--editor-color-primary); + direction: ltr; } -.editor-image-decorator-handle { +.editor-node-resizer-handle { position: absolute; display: block; width: 10px; height: 10px; border: 2px solid var(--editor-color-primary); + z-index: 3; background-color: #FFF; user-select: none; &.nw { @@ -291,6 +367,21 @@ body.editor-is-fullscreen { cursor: sw-resize; } } +.editor-node-resizer-ghost { + opacity: 0.5; + display: none; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 2; + pointer-events: none; + background-color: var(--editor-color-primary); +} +.editor-node-resizer.active .editor-node-resizer-ghost { + display: block; +} .editor-table-marker { position: fixed; @@ -324,6 +415,24 @@ body.editor-is-fullscreen { outline: 2px dashed var(--editor-color-primary); } +.editor-media-wrap { + display: inline-block; + cursor: not-allowed; + iframe { + pointer-events: none; + } + &.align-left { + float: left; + } + &.align-right { + float: right; + } + &.align-center { + display: block; + margin-inline: auto; + } +} + /** * Fake task list checkboxes */ @@ -355,7 +464,9 @@ body.editor-is-fullscreen { background-size: 100% 100%; } -// Editor form elements +/** + * Form elements + */ .editor-form-field-wrapper { margin-bottom: .5rem; } @@ -468,6 +579,16 @@ textarea.editor-form-field-input { .editor-form-tab-contents { width: 360px; } +.editor-action-input-container { + display: flex; + flex-direction: row; + align-items: end; + justify-content: space-between; + gap: .1rem; + .editor-button { + margin-bottom: 12px; + } +} // Editor theme styles .editor-theme-bold {