bidi fixes

This commit is contained in:
Lim Chee Aun 2023-08-23 18:34:11 +08:00
parent b22ea39e6c
commit e8cc26fe2b
2 changed files with 11 additions and 8 deletions

View file

@ -535,6 +535,13 @@
color: var(--text-color); color: var(--text-color);
text-decoration-color: var(--link-color); text-decoration-color: var(--link-color);
} }
.status .content :is(.h-card, .mention) {
unicode-bidi: isolate;
}
.status .spoiler-content > *,
.status .content .inner-content > * {
unicode-bidi: plaintext;
}
.status .content p { .status .content p {
/* 12px = 75% of 16px */ /* 12px = 75% of 16px */
margin-block: min(0.75em, 12px); margin-block: min(0.75em, 12px);

View file

@ -1045,7 +1045,7 @@ function Status({
{!!spoilerText && ( {!!spoilerText && (
<> <>
<div <div
class="content" class="content spoiler-content"
lang={language} lang={language}
dir="auto" dir="auto"
ref={spoilerContentRef} ref={spoilerContentRef}
@ -1073,14 +1073,10 @@ function Status({
</button> </button>
</> </>
)} )}
<div <div class="content" ref={contentRef} data-read-more={readMoreText}>
class="content"
lang={language}
dir="auto"
ref={contentRef}
data-read-more={readMoreText}
>
<div <div
lang={language}
dir="auto"
class="inner-content" class="inner-content"
onClick={handleContentLinks({ mentions, instance, previewMode })} onClick={handleContentLinks({ mentions, instance, previewMode })}
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{