-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Verse Block: Prevent text overflow off-screen when the previous block has float #45221
base: trunk
Are you sure you want to change the base?
Conversation
@@ -2,4 +2,8 @@ pre.wp-block-verse { | |||
font-family: inherit; | |||
overflow: auto; | |||
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: +71 B (0%) Total Size: 1.84 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
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