From fd63666e7794de2d263c2efa7736ff8f82f94d1d Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Sun, 27 Oct 2024 22:50:45 +0800 Subject: [PATCH] feat: enhanced text wrapping and ant-input styling --- src/renderer/src/assets/styles/index.scss | 6 +++++- src/renderer/src/pages/home/Inputbar/Inputbar.tsx | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/assets/styles/index.scss b/src/renderer/src/assets/styles/index.scss index 4ed905879c..849ac47cc0 100644 --- a/src/renderer/src/assets/styles/index.scss +++ b/src/renderer/src/assets/styles/index.scss @@ -189,7 +189,11 @@ body[os='windows'] { } .text-nowrap { - white-space: nowrap; + display: -webkit-box !important; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; + white-space: normal; + word-wrap: break-word; } diff --git a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx index f700e72029..b551c3c70f 100644 --- a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx +++ b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx @@ -398,6 +398,9 @@ const Textarea = styled(TextArea)` overflow: auto; width: 100%; box-sizing: border-box; + &.ant-input { + line-height: 1.4; + } ` const Toolbar = styled.div`