From 233337da3cf3ddb43e6651ac62377b775de80585 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 2 Sep 2022 14:23:40 +0800 Subject: [PATCH] fix EasyMDE statusbar margin --- templates/repo/issue/comment_tab.tmpl | 2 +- web_src/less/codemirror/base.less | 4 ++++ web_src/less/features/dropzone.less | 7 ------- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl index 5397312cf758..5c9a3701965e 100644 --- a/templates/repo/issue/comment_tab.tmpl +++ b/templates/repo/issue/comment_tab.tmpl @@ -14,7 +14,7 @@ {{end}} {{end}} {{if .IsAttachmentEnabled}} -
+
{{template "repo/upload" .}}
{{end}} diff --git a/web_src/less/codemirror/base.less b/web_src/less/codemirror/base.less index 87344574634f..db0a93f4c74a 100644 --- a/web_src/less/codemirror/base.less +++ b/web_src/less/codemirror/base.less @@ -1,3 +1,7 @@ +.ui .field:not(:last-child) .EasyMDEContainer .editor-statusbar { + margin-bottom: -1em; // when there is a statusbar, the "margin-bottom: 1em" of the "field" is not needed, because the statusbar is likely a blank line +} + .EasyMDEContainer .CodeMirror { color: var(--color-input-text); background-color: var(--color-input-background); diff --git a/web_src/less/features/dropzone.less b/web_src/less/features/dropzone.less index 9aee645c1e12..ee7a5f1b65d4 100644 --- a/web_src/less/features/dropzone.less +++ b/web_src/less/features/dropzone.less @@ -6,19 +6,12 @@ padding: 0; border-radius: 4px; min-height: 0; - margin-top: -1em; // we have another `field` above, it's usually an EasyMDE editor with "status bar", so we do not need the space above. .dz-message { margin: 10px 0; } } } -.ui .field.not-under-easymde { - .dropzone { - margin-top: 0; // the `field` above isn't an EasyMDE editor - } -} - .dropzone .dz-button { color: var(--color-text-light) !important; }