Repository navigation
fix(home): 手机端首页只在词组之间换行 - #13
Merged
Merged
Conversation
On phones the hero sentences are wider than a line, so the browser broke
them wherever it could: inside Chinese words (编程|语言, 易错|陷阱) and
inside English phrases ("in a / new language", "quick / onboarding").
text-wrap: balance evens out line lengths but knows nothing about
phrases. Wrap each phrase of the homepage h1 and description in an
inline-block .phrase span so lines break only between phrases. Desktop
layout is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
手机上首页标题和简介的句子比一行宽,浏览器会在任意位置折行:中文断在词中间(「编程|语言」「易错|陷阱」),英文把词组拆开("in a / new language"、"quick / onboarding")。
text-wrap: balance只会把各行拉得差不多长,不懂词组。改动
<span class="phrase">。英文在逗号处分组,中文在顿号和句号处分组global.css新增.phrase { display: inline-block; },窄屏只在词组之间换行验证
npm run build和npm run check通过🤖 Generated with Claude Code