From 4ec7da6f1fd84921e6625cb2bf9f456965c5166c Mon Sep 17 00:00:00 2001 From: Jason Ernst Date: Tue, 22 Sep 2026 23:08:40 -0700 Subject: [PATCH] Editor: stop scaling heading sizes in the markdown source view SimpleMDE's stylesheet scales headings inside the CodeMirror editing surface to 200%/160%/125%/110%, a leftover from when the browser was also the renderer. #617 moved rendering to the server, so those sizes now only claim to show the result while disagreeing with it, and the line height lurches as you type past a "#". Override them in admin.css, which already owns the editor chrome added by #617 and loads after the SimpleMDE CDN stylesheet, so an equal-specificity rule wins on source order. Measured in Chrome against SimpleMDE 1.11.2: headings go from 32/25.6/20px to 16px, matching the body text, while font-weight:700, cm-strong, cm-em and the code background are left alone. This lives in goblog rather than the themes because themes do not ship admin.css, so every theme picks it up without a release. Co-Authored-By: Claude Opus 5 (1M context) --- www/css/admin.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/www/css/admin.css b/www/css/admin.css index b7f41a2..a141904 100644 --- a/www/css/admin.css +++ b/www/css/admin.css @@ -81,3 +81,18 @@ background: #fff; } .editor-tabs { margin-bottom: 0; } + +/* The editor is a markdown source view, not a second preview. #617 moved + rendering to the server, so SimpleMDE's live heading sizes only claimed to + show the result while disagreeing with it — and made the line height lurch + while typing. Headings keep their bold weight, so they are still easy to + pick out while scanning; only the size scaling goes. */ +.CodeMirror .CodeMirror-code .cm-header-1, +.CodeMirror .CodeMirror-code .cm-header-2, +.CodeMirror .CodeMirror-code .cm-header-3, +.CodeMirror .CodeMirror-code .cm-header-4, +.CodeMirror .CodeMirror-code .cm-header-5, +.CodeMirror .CodeMirror-code .cm-header-6 { + font-size: 100%; + line-height: inherit; +}