Skip to content

Commit 0e05984

Browse files
authored
Set EasyMDE heading font-size to the same size as the resulting markdown (#24151)
Fix #23816 According to my personal experience, the EasyMDE is still useful when writing a lot of contents, eg: the wiki page. It's not difficult to improve its heading styles, so let's make it. Before: <img width="815" alt="image" src="https://user-images.githubusercontent.com/2114189/232280943-9177f0bc-e380-426f-8588-20ff8d8e5293.png"> After: <img width="538" alt="image" src="https://user-images.githubusercontent.com/2114189/232280903-e8c476ee-f5b1-48fe-8a93-86fcd79680c3.png">
1 parent 1af3dc6 commit 0e05984

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

web_src/css/editor-markdown.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,31 @@
4444
max-height: calc(100vh - 200px);
4545
}
4646

47+
/* use the same styles as markup/content.css */
48+
.combo-markdown-editor .CodeMirror-scroll .cm-header-1 {
49+
font-size: 2em;
50+
}
51+
52+
.combo-markdown-editor .CodeMirror-scroll .cm-header-2 {
53+
font-size: 1.5em;
54+
}
55+
56+
.combo-markdown-editor .CodeMirror-scroll .cm-header-3 {
57+
font-size: 1.25em;
58+
}
59+
60+
.combo-markdown-editor .CodeMirror-scroll .cm-header-4 {
61+
font-size: 1em;
62+
}
63+
64+
.combo-markdown-editor .CodeMirror-scroll .cm-header-5 {
65+
font-size: 0.875em;
66+
}
67+
68+
.combo-markdown-editor .CodeMirror-scroll .cm-header-6 {
69+
font-size: 0.85em;
70+
}
71+
4772
text-expander {
4873
display: block;
4974
position: relative;

0 commit comments

Comments
 (0)