-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Verse Block: Prevent text overflow off-screen when the previous block has float #45221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| white-space: pre-wrap; | ||
|
|
||
| // Prevent text overflow off-screen when the previous block has float. | ||
| min-width: 1em; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Size Change: +70 B (0%) Total Size: 2.57 MB
ℹ️ View Unchanged
|
7539ab8 to
c8230d6
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @kavyagokul. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
c8230d6 to
ddf21b7
Compare
33bc2b0 to
bb05073
Compare
bb05073 to
f110596
Compare
ramonjd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a decent improvement.
Shame it sat here for so long!
Before
2025-11-28.15.18.48.mp4
After
2025-11-28.15.18.05.mp4
|
@ramonjd Thank you for noticing this PR 🙂 |

Fix #44924
What?
This PR fixes a problem with verse text being pushed off the screen at mobile sizes when a block with a float applied is placed before the verse block.
Why?
My understanding is that wrapping is intentionally prohibited, as was done in #9584.
This makes sense, but I believe that wrapping should be allowed if the text overflows the container.
How?
I have added
word-break:bread-word;to allow for wrapping if the screen width is such that the text overflows.Screenshots or screencast
On trunk
Confirm that the verse text is pushed out of view when the screen width is small.
Screencast: Verse with left-aligned image on trunk
trunk_left.mp4
Screencast: Verse with right-aligned image on trunk
trunk_right.mp4
On this branch
Confirm that the text wraps just before the verse text becomes invisible.
Screencast: Verse with left-aligned image on this branch
branch_left.mp4
Screencast: Verse with right-aligned image on this branch
branch_right.mp4