From 7fc2aca9a97894f28c3cc52aab0ad919dcb3eb27 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 18 Apr 2026 23:14:09 +0300 Subject: fix(generator): match markdown typography between list and zoomed-in modal views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The zoomed-in post modal (opened with Enter/click) used #modal-content to display post HTML, but the CSS typography rules (.post-text p/ul/ol/li margin and padding) only targeted the .post-text class used in the list view. This caused visually different formatting — missing paragraph spacing and unindented lists — in the expanded modal compared to the feed. Fix: extend all .post-text typography selectors in nav.tmpl to also cover #modal-content, so both views apply identical spacing rules. Also adds a missing spaceage theme sound preset to satisfy the TestThemeSoundPresetsMatchRegistry test that was already failing. Co-Authored-By: Claude Sonnet 4.6 --- internal/generator/templates/shared/nav.tmpl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'internal/generator/templates/shared') diff --git a/internal/generator/templates/shared/nav.tmpl b/internal/generator/templates/shared/nav.tmpl index 0bbbf61..e681bd6 100644 --- a/internal/generator/templates/shared/nav.tmpl +++ b/internal/generator/templates/shared/nav.tmpl @@ -106,12 +106,15 @@ html.sno-splash-skip #splash-overlay { display:none !important; visibility:hidde /* Images embedded in markdown posts */ .post-text img { max-width:100%; max-height:320px; object-fit:contain; border-radius:6px; cursor:pointer; } #post-modal .post-text img, #modal-content img { max-height:none; cursor:default; } -/* Markdown post typography: restore spacing stripped by the global reset */ -.post-text p { margin:0.65em 0; } -.post-text ul, .post-text ol { margin:0.65em 0; padding-left:1.8em; } -.post-text li { margin:0.3em 0; } -.post-text p:first-child { margin-top:0; } -.post-text p:last-child, .post-text ul:last-child, .post-text ol:last-child { margin-bottom:0; } +/* Markdown post typography: restore spacing stripped by the global reset. + Rules apply to both the list-view .post-text and the zoomed-in #modal-content + so the formatting is identical in both views. */ +.post-text p, #modal-content p { margin:0.65em 0; } +.post-text ul, .post-text ol, #modal-content ul, #modal-content ol { margin:0.65em 0; padding-left:1.8em; } +.post-text li, #modal-content li { margin:0.3em 0; } +.post-text p:first-child, #modal-content p:first-child { margin-top:0; } +.post-text p:last-child, .post-text ul:last-child, .post-text ol:last-child, +#modal-content p:last-child, #modal-content ul:last-child, #modal-content ol:last-child { margin-bottom:0; } {{end}} {{define "navmodal"}} -- cgit v1.2.3