UBER-1039: Codeblock style fixes. (#3829)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2023-10-12 06:49:38 +03:00 committed by GitHub
parent b4795677ad
commit b0b40ca93e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -75,7 +75,7 @@
{:else if node.nodeName === 'BLOCKQUOTE'}
<blockquote><svelte:self nodes={node.childNodes} /></blockquote>
{:else if node.nodeName === 'CODE'}
<code class="proseCode"><svelte:self nodes={node.childNodes} /></code>
<pre class="proseCode"><svelte:self nodes={node.childNodes} /></pre>
{:else if node.nodeName === 'PRE'}
<pre class="proseCodeBlock"><svelte:self nodes={node.childNodes} /></pre>
{:else if node.nodeName === 'BR'}

View File

@ -47,6 +47,8 @@ table.proseTable {
}
.proseCode {
display: inline-block;
margin: 0;
padding: 0 .25rem;
font-family: var(--mono-font);
color: var(--theme-content-color);
@ -63,11 +65,11 @@ table.proseTable {
border-radius: .25rem;
padding: .5rem;
code { white-space: normal; }
pre { white-space: pre-wrap; }
}
// Fixes for MessageViewer
pre.proseCodeBlock > code.proseCode {
pre.proseCodeBlock > pre.proseCode {
padding: 0;
background-color: transparent;
border: none;