diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-18 23:14:09 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-18 23:14:09 +0300 |
| commit | 7fc2aca9a97894f28c3cc52aab0ad919dcb3eb27 (patch) | |
| tree | 4d891975e1a96f9dadbae67d19207f033d47270f /internal/generator/templates/shared | |
| parent | c96b991081fa56aad043f39ab85c4862db7d86d6 (diff) | |
fix(generator): match markdown typography between list and zoomed-in modal views
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 <noreply@anthropic.com>
Diffstat (limited to 'internal/generator/templates/shared')
| -rw-r--r-- | internal/generator/templates/shared/nav.tmpl | 15 |
1 files changed, 9 insertions, 6 deletions
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"}} |
