Merge pull request #196 from ollama-webui/codeblock-width

feat: horizontal scroll for code block
This commit is contained in:
Timothy Jaeryang Baek 2023-12-08 21:29:34 -05:00 committed by GitHub
commit 1e880f2526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -14,6 +14,12 @@ html {
word-break: break-word; word-break: break-word;
} }
code {
white-space-collapse: preserve !important;
white-space: nowrap;
width: auto;
}
math { math {
margin-top: 1rem; margin-top: 1rem;
} }
@ -31,8 +37,8 @@ math {
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
height: 1rem; height: 0.45rem;
width: 0.5rem; width: 0.35rem;
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {

View file

@ -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