Skip to content

fix: 移除 .h2w 全局 text-align:justify,修复 iOS 26 代码块/正文渲染错位#354

Open
xiaofeihan1 wants to merge 2 commits into
sbfkcel:masterfrom
xiaofeihan1:fix/ios26-justify
Open

fix: 移除 .h2w 全局 text-align:justify,修复 iOS 26 代码块/正文渲染错位#354
xiaofeihan1 wants to merge 2 commits into
sbfkcel:masterfrom
xiaofeihan1:fix/ios26-justify

Conversation

@xiaofeihan1

Copy link
Copy Markdown

iOS 26 的 WebKit 会对以
结尾的行执行两端对齐,导致 towxml
渲染的代码块、列表等被横向拉散(见 #353)。

  • 移除 .h2w 上的全局 text-align:justify
  • 仅在块级段落 .h2w__p 上保留两端对齐
  • 给 .h2w__pre / .h2w__code 显式设置 text-align:left
  • 同步更新 dist/style/main.wxss 构建产物

测试:已在 ios26 和 ipados26 测试

xiaofeihan1 and others added 2 commits June 1, 2026 22:42
iOS 26 的 WebKit 会对以 <br> 结尾的行执行两端对齐,导致 towxml
渲染的代码块、列表等被横向拉散(见 sbfkcel#353)。

- 移除 .h2w 上的全局 text-align:justify
- 仅在块级段落 .h2w__p 上保留两端对齐
- 给 .h2w__pre / .h2w__code 显式设置 text-align:left
- 同步更新 dist/style/main.wxss 构建产物
@xiaofeihan1 xiaofeihan1 closed this Jun 2, 2026
@xiaofeihan1 xiaofeihan1 reopened this Jun 2, 2026
@sbfkcel

sbfkcel commented Jun 3, 2026

Copy link
Copy Markdown
Owner

修改了太多文件。只需要将 text-align:justify 去掉即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants