From 14f2db730a0ddd0b8e0c3e221e5601c6d75af466 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Sun, 23 Mar 2025 23:59:45 +0800 Subject: [PATCH] fix: add option to override justify style in books, closes #671 (#687) --- apps/readest-app/src/utils/style.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/readest-app/src/utils/style.ts b/apps/readest-app/src/utils/style.ts index 7345ab69..da87616c 100644 --- a/apps/readest-app/src/utils/style.ts +++ b/apps/readest-app/src/utils/style.ts @@ -205,7 +205,7 @@ const getLayoutStyles = ( word-spacing: ${wordSpacing}px ${overrideLayout ? '!important' : ''}; letter-spacing: ${letterSpacing}px ${overrideLayout ? '!important' : ''}; text-indent: ${textIndent}em ${overrideLayout ? '!important' : ''}; - text-align: inherit; + text-align: ${overrideLayout ? 'var(--default-text-align) !important' : 'inherit'}; -webkit-hyphens: ${hyphenate ? 'auto' : 'manual'}; hyphens: ${hyphenate ? 'auto' : 'manual'}; -webkit-hyphenate-limit-before: 3;