aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2022-01-07 00:41:31 -0800
committerGitHub <noreply@github.com>2022-01-07 16:41:31 +0800
commit3dbdf36d952678aafd1dac1a9fccce51bdbb8fc0 (patch)
tree4b083828242277506a7b47de80cdb8bb8db617d3 /web_src/js/features
parent80705cf4b4ecbbeb4d9636bfa105cf87625b06b5 (diff)
downloadgitea-3dbdf36d952678aafd1dac1a9fccce51bdbb8fc0.tar.gz
gitea-3dbdf36d952678aafd1dac1a9fccce51bdbb8fc0.zip
Fix CSS specificity issue with easymde's css (#18201)
* Fix CSS specificity issue with easymde's css PR #18069 introduced a regression in certain overwritten editor styles because the dynamic loading of easymde.min.css causes its's style to apply after our supposed override styles. Solve this by bundling the styles into index.css. We should later aim to completely replace easymde.min.css completely with our own styles so there are no more conflicts. * Update web_src/js/features/comp/EasyMDE.js Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/js/features')
-rw-r--r--web_src/js/features/comp/EasyMDE.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/features/comp/EasyMDE.js b/web_src/js/features/comp/EasyMDE.js
index d5c1a4c734..922d03d396 100644
--- a/web_src/js/features/comp/EasyMDE.js
+++ b/web_src/js/features/comp/EasyMDE.js
@@ -25,10 +25,10 @@ export async function importEasyMDE() {
// https://github.com/codemirror/CodeMirror/issues/5484
// https://github.com/codemirror/CodeMirror/issues/4838
+ // EasyMDE's CSS should be loaded via webpack config, otherwise our own styles can not overwrite the default styles.
const [{default: EasyMDE}, {default: CodeMirror}] = await Promise.all([
import(/* webpackChunkName: "easymde" */'easymde'),
import(/* webpackChunkName: "codemirror" */'codemirror'),
- import(/* webpackChunkName: "easymde" */'easymde/dist/easymde.min.css'),
]);
// CodeMirror plugins must be loaded by a "Plain browser env"