From e866a9bd3d0ce8339f8ba66de55d60d44754c6ea Mon Sep 17 00:00:00 2001 From: PathGao Date: Wed, 23 Sep 2026 05:13:46 +0800 Subject: [PATCH 1/2] feat(preview): space CJK from Latin text text-autospace: normal on .markdown-body. Code keeps no-autospace so monospace alignment is unchanged. Engines without support ignore it. --- src/styles.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/styles.css b/src/styles.css index 60e847a5..b232cb38 100644 --- a/src/styles.css +++ b/src/styles.css @@ -232,6 +232,8 @@ body { word-wrap: break-word; overflow-wrap: anywhere; text-align: left; + /* Space CJK from Latin. Ignored where unsupported. */ + text-autospace: normal; user-select: text; -webkit-user-select: text; } @@ -590,6 +592,7 @@ body { .markdown-body samp { font-family: monospace, monospace; font-size: 1em; + text-autospace: no-autospace; } .markdown-body figure { From c7446bad93ad1d491da7fc2cb37e8dc454668e91 Mon Sep 17 00:00:00 2001 From: PathGao Date: Wed, 23 Sep 2026 05:26:23 +0800 Subject: [PATCH 2/2] feat(preview): balance heading lines and align table digits text-wrap-style: balance on headings so a wrapped heading does not end on one or two characters. tabular-nums in table cells so numbers in a column line up. --- src/styles.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/styles.css b/src/styles.css index b232cb38..966e3a38 100644 --- a/src/styles.css +++ b/src/styles.css @@ -720,6 +720,7 @@ body { white-space: normal; overflow-wrap: anywhere; word-break: normal; + font-variant-numeric: tabular-nums; } .markdown-body table tr { @@ -775,6 +776,7 @@ body { margin-bottom: 16px; font-weight: 600; line-height: 1.25; + text-wrap-style: balance; position: relative; }