Repository navigation
Keep a paragraph's last word off a line of its own - #7266
Merged
Merged
Conversation
The reading face sets `text-wrap-style: pretty` on `p`, so a paragraph no longer ends on one stranded word where the browser can move a second one down, as `review-a-plan`'s lede did with "Codex." at 1280px. Across the 49 corpus pages at 1280px, paragraphs ending on one word drop from 24 to 6 in Chromium (the rest end on a long identifier or hash) and from 17 to 2 in WebKit. Firefox, 160 included, lacks the value and draws as before; `notes/browser-support.md` records the gap. To weigh: the scope is `p` alone, since the property inherits and a list item or cell can hold a field or a code block. The floating panel's comment field sits in a list item, and its lines would rebreak as the user typed. The user's own message paragraphs keep `auto`, so a rewrite still opens with every word where it stood. Bench CPU on the corpus page (17,480 elements): keystroke 8.2 → 7.4 ms, wheel step 6.8 → 5.8 ms, load unchanged. WebKit added a line to one paragraph of 208, and reflows 600 long paragraphs in 90 ms against 19. Tests: `test_interact_layer.py`, `test_theme_tokens.py`, and the rewrite and reading-place browser tests. > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
approved these changes
Nov 26, 2026
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.
The reading face sets
text-wrap-style: prettyonp, so a paragraph no longer ends on one stranded word where the browser can move a second one down, asreview-a-plan's lede did with "Codex." at 1280px. Across the 49 corpus pages at 1280px, paragraphs ending on one word drop from 24 to 6 in Chromium (the rest end on a long identifier or hash) and from 17 to 2 in WebKit. Firefox, 160 included, lacks the value and draws as before;notes/browser-support.mdrecords the gap.To weigh: the scope is
palone, since the property inherits and a list item or cell can hold a field or a code block. The floating panel's comment field sits in a list item, and its lines would rebreak as the user typed. The user's own message paragraphs keepauto, so a rewrite still opens with every word where it stood. Bench CPU on the corpus page (17,480 elements): keystroke 8.2 → 7.4 ms, wheel step 6.8 → 5.8 ms, load unchanged. WebKit added a line to one paragraph of 208, and reflows 600 long paragraphs in 90 ms against 19.Tests:
test_interact_layer.py,test_theme_tokens.py, and the rewrite and reading-place browser tests.