From: Dan Brown Date: Sun, 27 Nov 2022 19:52:10 +0000 (+0000) Subject: Tightened existing markdown editor styles X-Git-Tag: v22.11~1^2~5^2~3 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/3995b01399e5602a0c401eb33f51e9b3cdf3c120 Tightened existing markdown editor styles --- diff --git a/resources/icons/image.svg b/resources/icons/image.svg index 12ab73870..fcb5e8e85 100644 --- a/resources/icons/image.svg +++ b/resources/icons/image.svg @@ -1,4 +1 @@ - - - - \ No newline at end of file + diff --git a/resources/sass/_forms.scss b/resources/sass/_forms.scss index 57799faef..d9e18a9ed 100644 --- a/resources/sass/_forms.scss +++ b/resources/sass/_forms.scss @@ -64,14 +64,6 @@ flex: 1; position: relative; } - .markdown-editor-wrap { - display: flex; - flex-direction: column; - border: 1px solid #DDD; - @include lightDark(border-color, #ddd, #000); - width: 50%; - max-width: 50%; - } &.fullscreen { position: fixed; top: 0; @@ -81,6 +73,21 @@ } } +.markdown-editor-wrap { + display: flex; + flex-direction: column; + border-top: 1px solid #DDD; + border-bottom: 1px solid #DDD; + @include lightDark(border-color, #ddd, #000); + width: 50%; + max-width: 50%; +} + +.markdown-editor-wrap + .markdown-editor-wrap { + border-inline-start: 1px solid; + @include lightDark(border-color, #ddd, #000); +} + @include smaller-than($m) { #markdown-editor { flex-direction: column; @@ -98,7 +105,7 @@ } .editor-toolbar-label { float: none !important; - border-bottom: 1px solid #DDD; + @include lightDark(border-color, #DDD, #555); display: block; } .markdown-editor-wrap:not(.active) .editor-toolbar + div, @@ -113,10 +120,6 @@ } } -.markdown-display { - margin-inline-start: -1px; -} - .markdown-editor-display { background-color: #fff; body { @@ -138,8 +141,8 @@ html.markdown-editor-display.dark-mode { } .editor-toolbar { + height: 32px; width: 100%; - padding: $-xs $-m; font-size: 11px; line-height: 1.6; border-bottom: 1px solid #DDD; @@ -147,11 +150,6 @@ html.markdown-editor-display.dark-mode { @include lightDark(background-color, #eee, #111); @include lightDark(border-color, #ddd, #000); flex: none; - &:after { - content: ''; - display: block; - clear: both; - } @include whenDark { button { color: #AAA; @@ -159,6 +157,20 @@ html.markdown-editor-display.dark-mode { } } +.editor-toolbar .buttons button { + font-size: .9rem; + width: 2rem; + text-align: center; + border-left: 1px solid; + @include lightDark(border-color, #DDD, #555); + svg { + margin-inline-end: 0; + } + &:hover { + @include lightDark(background-color, #DDD, #222); + } +} + label { @include lightDark(color, #666, #ddd); diff --git a/resources/sass/_layout.scss b/resources/sass/_layout.scss index a5f895f80..4c7de600b 100644 --- a/resources/sass/_layout.scss +++ b/resources/sass/_layout.scss @@ -198,6 +198,9 @@ body.flexbox { .items-center { align-items: center; } +.items-stretch { + align-items: stretch; +} /** * Min width utilities diff --git a/resources/sass/_text.scss b/resources/sass/_text.scss index 4eab8959a..6c68bd12b 100644 --- a/resources/sass/_text.scss +++ b/resources/sass/_text.scss @@ -5,7 +5,7 @@ body, button, input, select, label, textarea { font-family: $text; } -.Codemirror, pre, #markdown-editor-input, .editor-toolbar, .code-base { +.Codemirror, pre, #markdown-editor-input, .text-mono, .code-base { font-family: $mono; } diff --git a/resources/views/pages/parts/markdown-editor.blade.php b/resources/views/pages/parts/markdown-editor.blade.php index 1577be052..3b4b1cb21 100644 --- a/resources/views/pages/parts/markdown-editor.blade.php +++ b/resources/views/pages/parts/markdown-editor.blade.php @@ -6,18 +6,17 @@ class="flex-fill flex code-fill">
-
- {{ trans('entities.pages_md_editor') }} -
+
+
+ {{ trans('entities.pages_md_editor') }} +
+
@if(config('services.drawio')) - - | + @endif - - | - - | - + + +
@@ -33,7 +32,7 @@
-
{{ trans('entities.pages_md_preview') }}
+
{{ trans('entities.pages_md_preview') }}