Bläddra i källkod

feat: horizontal scroll for code block

Timothy J. Baek 1 år sedan
förälder
incheckning
d0633a9499
2 ändrade filer med 9 tillägg och 1 borttagningar
  1. 8 0
      src/app.css
  2. 1 1
      src/lib/components/chat/Messages.svelte

+ 8 - 0
src/app.css

@@ -14,6 +14,14 @@ html {
 	word-break: break-word;
 	word-break: break-word;
 }
 }
 
 
+code {
+	white-space-collapse: preserve !important;
+	/* text-wrap: nowrap !important; */
+
+	white-space: nowrap;
+	width: auto;
+}
+
 math {
 math {
 	margin-top: 1rem;
 	margin-top: 1rem;
 }
 }

+ 1 - 1
src/lib/components/chat/Messages.svelte

@@ -372,7 +372,7 @@
 						{/if}
 						{/if}
 					</div>
 					</div>
 
 
-					<div class="w-full">
+					<div class="w-full overflow-hidden">
 						<div class=" self-center font-bold mb-0.5">
 						<div class=" self-center font-bold mb-0.5">
 							{#if message.role === 'user'}
 							{#if message.role === 'user'}
 								You
 								You