From 70fa3bb6a8aaf13cb0d668dbf5a0eb67ebb95133 Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 2 Oct 2025 23:52:12 +0200 Subject: [PATCH] fix(ui): left-align content and constrain images in content panel - Force left alignment for HTML/Markdown content - Constrain images to container width and 70vh height - Improve readability of rendered articles --- src/index.css | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/index.css b/src/index.css index ad5a2fc7..c0e24394 100644 --- a/src/index.css +++ b/src/index.css @@ -280,6 +280,7 @@ body { border: 1px solid #333; border-radius: 12px; padding: 1rem; + text-align: left; } .content-panel.empty { @@ -303,6 +304,29 @@ body { line-height: 1.7; } +/* Ensure content is left-aligned even if source markup uses center */ +.content-panel .content-html *, +.content-panel .content-markdown * { + text-align: left !important; +} + +.content-panel center, +.content-panel [align="center"] { + text-align: left !important; +} + +/* Tame images from external content */ +.content-panel .content-html img, +.content-panel .content-markdown img { + max-width: 100%; + max-height: 70vh; + height: auto; + width: auto; + display: block; + margin: 0.75rem 0; + border-radius: 6px; +} + .content-markdown h1, .content-markdown h2, .content-markdown h3,