From 9e0bd69166943f11fb20aa71f813b9b69edf694e Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 2 May 2025 14:36:37 +0200 Subject: [PATCH] ui: ensure md table has max sizes to prevent overflow --- .../app/components/Kai/components/ChatMsg.tsx | 4 +- frontend/app/styles/main.css | 56 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/Kai/components/ChatMsg.tsx b/frontend/app/components/Kai/components/ChatMsg.tsx index db8cd082f..1921a0b80 100644 --- a/frontend/app/components/Kai/components/ChatMsg.tsx +++ b/frontend/app/components/Kai/components/ChatMsg.tsx @@ -50,7 +50,9 @@ export function ChatMsg({ )}
- {text} +
+ {text} +
{isUser ? ( isLast ? (
:last-child { + margin-bottom: 0; +} + +.markdown-body table thead { + background-color: rgba(235, 235, 255, 1); +} + +.markdown-body table tbody tr { + background-color: rgba(250, 250, 255, 1); +} + +.markdown-body table tbody td { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + min-width: 30px; + max-width: 300px; +} + +.markdown-body table tr:nth-child(2n) { + background-color: rgba(235, 235, 255, 1); +} + +.markdown-body table img { + background-color: transparent; +}