-
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
Image: Fix caption link wrapping in wide/full alignment #67220
Image: Fix caption link wrapping in wide/full alignment #67220
Conversation
Modifies the width property for links within wide and full-width image blocks from 100% to auto to prevent unintended line breaks in captions.
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 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. |
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.
I tested the change using Chrome and Firefox on Windows 11 and it is working well in both the editors and front. I tested with different themes, and also with different link settings such as the lightbox.
@himanshupathak95 Thanks for the PR. I looked into this issue and it appears to have already been resolved by #67392. I would like to close this PR, but thank you for your efforts. |
Fixes: #67206
What?
Changes the width CSS property of links within wide and full-width image block captions to prevent caption text from splitting across lines.
Why?
Currently, when a caption in a wide or full-width Image Block contains a link, the linked text appears on a separate line from the rest of the caption text. This creates an undesirable visual break in what should be continuous caption text.
This occurs due to the
width: 100%
CSS property being applied to links within wide/full-width image blocks, forcing them to take up the full width and create a line break.Testing Instructions
Screenshots