feat(css): override document layout also apply to hyphenation, closes #4529 (#4546)

This commit is contained in:
Huang Xin
2026-06-12 14:54:13 +08:00
committed by GitHub
parent 4ff96800d2
commit 5cab1fa94b
6 changed files with 95 additions and 4 deletions
+4 -4
View File
@@ -539,8 +539,8 @@ const getParagraphLayoutStyles = (
word-spacing: ${wordSpacing}px ${overrideLayout ? '!important' : ''};
letter-spacing: ${letterSpacing}px ${overrideLayout ? '!important' : ''};
text-indent: ${textIndent}em ${overrideLayout ? '!important' : ''};
-webkit-hyphens: ${hyphenate ? 'auto' : 'manual'};
hyphens: ${hyphenate ? 'auto' : 'manual'};
-webkit-hyphens: ${hyphenate ? 'auto' : 'manual'} ${overrideLayout ? '!important' : ''};
hyphens: ${hyphenate ? 'auto' : 'manual'} ${overrideLayout ? '!important' : ''};
-webkit-hyphenate-limit-before: 3;
-webkit-hyphenate-limit-after: 2;
-webkit-hyphenate-limit-lines: 2;
@@ -549,8 +549,8 @@ const getParagraphLayoutStyles = (
}
li {
line-height: ${lineSpacing} ${overrideLayout ? '!important' : ''};
-webkit-hyphens: ${hyphenate ? 'auto' : 'manual'};
hyphens: ${hyphenate ? 'auto' : 'manual'};
-webkit-hyphens: ${hyphenate ? 'auto' : 'manual'} ${overrideLayout ? '!important' : ''};
hyphens: ${hyphenate ? 'auto' : 'manual'} ${overrideLayout ? '!important' : ''};
}
p.aligned-center, blockquote.aligned-center,
dd.aligned-center, div.aligned-center {