diff --git a/css/html_instruct_style.css b/css/html_instruct_style.css
index 286029fb..30dea47d 100644
--- a/css/html_instruct_style.css
+++ b/css/html_instruct_style.css
@@ -14,11 +14,14 @@
.message-body p {
font-size: 15px !important;
line-height: 22px !important;
+}
+
+.message-body p, .chat .message-body ul, .chat .message-body ol {
margin-bottom: 1.25em !important;
}
-.chat .message-body ul, .chat .message-body ol {
- margin-bottom: 1.25em !important;
+.message-body p:last-child, .chat .message-body ul:last-child, .chat .message-body ol:last-child {
+ margin-bottom: 0em !important;
}
.dark .message-body p em {
diff --git a/css/main.css b/css/main.css
index 4d09d373..f5093274 100644
--- a/css/main.css
+++ b/css/main.css
@@ -381,13 +381,27 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
list-style-type: disc !important;
}
-.message-body pre {
+.message-body pre:not(:last-child) {
margin-bottom: 1.25em !important;
}
+.message-body pre:last-child {
+ margin-bottom: 0px !important;
+}
+
.message-body code {
white-space: pre-wrap !important;
word-wrap: break-word !important;
+ border: 1px solid var(--border-color-primary);
+ border-radius: var(--radius-sm);
+ background: var(--background-fill-secondary);
+ font-size: 85%;
+ padding: 1px 3px;
+}
+
+.message-body pre > code {
+ display: block;
+ padding: .5em .7em;
}
.message-body :not(pre) > code {