From 3b51719abca55ea20eada2e871ac06537e904a8e Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Thu, 22 Oct 2026 17:32:35 +0200 Subject: [PATCH] Web page: keep long words and wide tables inside the viewport on narrow screens (#3594) Ported from #3594 by jkir4n. Co-authored-by: jkir4n <213039667+jkir4n@users.noreply.github.com> --- serve/web/app.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serve/web/app.css b/serve/web/app.css index 66d96acd..c95c83f2 100644 --- a/serve/web/app.css +++ b/serve/web/app.css @@ -23,7 +23,7 @@ main { flex: 1; min-height: 0; display: flex; } .chat-empty__sub { margin-top: var(--st-s-3); color: var(--st-ink-muted); } .st-msg { width: 100%; } .st-msg--assistant { align-self: flex-start; } -.st-msg--assistant .st-bubble { width: 100%; } +.st-msg--assistant .st-bubble { width: 100%; overflow-wrap: anywhere; } .st-msg--user .st-bubble { white-space: pre-wrap; overflow-wrap: anywhere; } .st-bubble > :first-child { margin-top: 0; } .st-bubble > :last-child { margin-bottom: 0; } @@ -38,7 +38,7 @@ main { flex: 1; min-height: 0; display: flex; } .st-bubble blockquote { margin: 0 0 var(--st-s-3); padding-left: var(--st-s-3); border-left: 3px solid var(--st-line); color: var(--st-ink-muted); } .st-bubble hr { border: 0; border-top: 1px solid var(--st-line); margin: var(--st-s-4) 0; } -.st-bubble table { border-collapse: collapse; margin: 0 0 var(--st-s-3); font-size: var(--st-fs-md); } +.st-bubble table { border-collapse: collapse; margin: 0 0 var(--st-s-3); font-size: var(--st-fs-md); display: block; max-width: 100%; overflow-x: auto; } .st-bubble th, .st-bubble td { border: 1px solid var(--st-line); padding: 6px 10px; text-align: left; } .msg-images { display: flex; flex-wrap: wrap; gap: var(--st-s-2); justify-content: flex-end; } .msg-images img { max-width: 220px; max-height: 180px; border-radius: var(--st-r-md); border: 1px solid var(--st-line); }