fix: only reduce line-height for post content

relate PR #557
zio/stable
三咲智子 2023-01-03 19:35:31 +08:00
parent 4308491e9c
commit 1d9bd6a9d4
No known key found for this signature in database
GPG Key ID: 69992F2250DFD93E
2 changed files with 6 additions and 2 deletions

View File

@ -12,6 +12,7 @@ const { translation } = useTranslation(status)
<div class="status-body" whitespace-pre-wrap break-words :class="{ 'with-action': withAction }"> <div class="status-body" whitespace-pre-wrap break-words :class="{ 'with-action': withAction }">
<ContentRich <ContentRich
v-if="status.content" v-if="status.content"
class="line-compact"
:content="status.content" :content="status.content"
:emojis="status.emojis" :emojis="status.emojis"
:lang="status.language" :lang="status.language"
@ -19,7 +20,7 @@ const { translation } = useTranslation(status)
<div v-else /> <div v-else />
<template v-if="translation.visible"> <template v-if="translation.visible">
<div my2 h-px border="b base" bg-base /> <div my2 h-px border="b base" bg-base />
<ContentRich :content="translation.text" :emojis="status.emojis" /> <ContentRich class="line-compact" :content="translation.text" :emojis="status.emojis" />
</template> </template>
</div> </div>
</template> </template>

View File

@ -97,7 +97,6 @@ body {
} }
.content-rich { .content-rich {
line-height: calc(4 / 3 * 1em);
overflow-wrap: break-word; overflow-wrap: break-word;
a { a {
@ -136,6 +135,10 @@ body {
} }
} }
.line-compact {
line-height: calc(4 / 3 * 1em);
}
.content-editor { .content-editor {
--at-apply: outline-none flex-1; --at-apply: outline-none flex-1;
max-width: 100%; max-width: 100%;