From 23c84c81be796a741da5d61d41760b1efdd13840 Mon Sep 17 00:00:00 2001
From: Kit La Touche <kit@transneptune.net>
Date: Mon, 4 Nov 2024 14:08:01 -0500
Subject: Fix width and scrolling

This is some jinbodger CSS. I really need to do a unified-CSS sweep.

I start to see why per-component CSS is bad, too; there are so many
long-distance interactions needed!
---
 ui/lib/components/Message.svelte | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'ui/lib/components/Message.svelte')

diff --git a/ui/lib/components/Message.svelte b/ui/lib/components/Message.svelte
index f0e7045..ea6e304 100644
--- a/ui/lib/components/Message.svelte
+++ b/ui/lib/components/Message.svelte
@@ -25,6 +25,14 @@
   .message:hover .timestamp {
     display: flex;
   }
+  .message-body {
+      overflow: auto;
+      max-width: 80vw;
+      @media (width > 640px) {
+          /* 21rem is width of the nav bar in full-screen mode. */
+          max-width: calc(90vw - 21rem);
+      }
+  }
   .message-body:empty:after {
     content: '.';
     visibility: hidden;
-- 
cgit v1.2.3

