diff --git a/apps/readest-app/src/utils/style.ts b/apps/readest-app/src/utils/style.ts index b8c5cc60..5442701f 100644 --- a/apps/readest-app/src/utils/style.ts +++ b/apps/readest-app/src/utils/style.ts @@ -239,7 +239,7 @@ 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' : 'inherit'} ${overrideLayout ? '!important' : ''}; + text-align: ${justify ? 'justify' : ''} ${overrideLayout ? '!important' : ''}; -webkit-hyphens: ${hyphenate ? 'auto' : 'manual'}; hyphens: ${hyphenate ? 'auto' : 'manual'}; -webkit-hyphenate-limit-before: 3; @@ -248,8 +248,7 @@ const getLayoutStyles = ( hanging-punctuation: allow-end last; widows: 2; } - p:has(> img:only-child), p:has(> span:only-child > img:only-child), - div[style*="text-align"] { + p:has(> img:only-child), p:has(> span:only-child > img:only-child) { text-indent: unset !important; } p, div { @@ -318,6 +317,10 @@ const getLayoutStyles = ( div.center *, p.center * { text-align: center; } div.justify *, p.justify * { text-align: justify; } + .nonindent, .noindent { + text-indent: unset !important; + } + /* for the Gutenberg eBooks */ #pg-header * { color: inherit !important;