Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(llm): strange margins in chat message & input bar (revisited)
Elian Doran3dae93c55a1c
diff --git a/apps/client/src/widgets/sidebar/SidebarChat.css b/apps/client/src/widgets/sidebar/SidebarChat.cssindex f26e3b8b8d..c6f6594f4d 100644--- a/apps/client/src/widgets/sidebar/SidebarChat.css+++ b/apps/client/src/widgets/sidebar/SidebarChat.css@@ -53,17 +53,6 @@line-height: 1.5;}-.sidebar-chat-messages .llm-chat-markdown p {- margin: 0 0 0.5em 0;-}--/* Explicitly restate the margin for the last paragraph: ChatMessage.css zeroes it via- `.llm-chat-markdown p:last-child`, which ties this file's rule on specificity (0,2,1),- so the winner would otherwise depend on CSS chunk load order (differs dev vs prod). */-.sidebar-chat-messages .llm-chat-markdown p:last-child {- margin-bottom: 0.5em;-}-.sidebar-chat-messages .llm-chat-markdown pre {padding: 0.5rem;font-size: 0.8rem;diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.cssindex 4b870e16d7..24cb701a00 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css@@ -111,7 +111,15 @@outline: none;p {- margin: 0 !important;+ margin-bottom: 0.5rem;++ &:first-child {+ margin-top: 0;+ }++ &:last-child {+ margin-bottom: 0;+ }}}@@ -125,14 +133,6 @@cursor: not-allowed;}-.llm-chat-input.ck-content p {- margin: 0;-}--.llm-chat-input.ck-content p + p {- margin-top: 0.25rem;-}-.llm-chat-input.ck-content .mention {color: var(--main-selection-color, #007bff);background: transparent;