From 648d9ec260dd1e278a72d2de207eb0b5330b10ca Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Fri, 6 Jun 2025 18:08:53 +0800 Subject: [PATCH] css: unset justify text align when overriding layout, closes #1338 (#1358) --- apps/readest-app/src/utils/style.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/readest-app/src/utils/style.ts b/apps/readest-app/src/utils/style.ts index 93379b79..ea4e01fb 100644 --- a/apps/readest-app/src/utils/style.ts +++ b/apps/readest-app/src/utils/style.ts @@ -210,7 +210,8 @@ const getLayoutStyles = ( word-spacing: ${wordSpacing}px ${overrideLayout ? '!important' : ''}; letter-spacing: ${letterSpacing}px ${overrideLayout ? '!important' : ''}; text-indent: ${vertical ? textIndent * 1.2 : textIndent}em ${overrideLayout ? '!important' : ''}; - text-align: ${justify ? 'justify' : ''} ${overrideLayout ? '!important' : ''}; + ${justify ? `text-align: justify ${overrideLayout ? '!important' : ''};` : ''} + ${!justify && overrideLayout ? 'text-align: unset !important;' : ''}; -webkit-hyphens: ${hyphenate ? 'auto' : 'manual'}; hyphens: ${hyphenate ? 'auto' : 'manual'}; -webkit-hyphenate-limit-before: 3;