From 2b1731985518028d9b9956d8d75fb462afb3794a 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 4ed90587..849ac47c 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 f700e720..b551c3c7 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`