-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix: Stretchy text issue when nested on flex containers. #73652
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
base: trunk
Are you sure you want to change the base?
Fix: Stretchy text issue when nested on flex containers. #73652
Conversation
This reverts commit 1490580.
|
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. |
|
Size Change: +62 B (0%) Total Size: 2.57 MB
ℹ️ View Unchanged
|
Fixes an issue where Stretch text does not works well if nested inside flex based layouts like a stack whose width is limited for example by a column.
To fix the issue, we verify if the parent is a flex element, if yes, we use the parent width to constraint fit text (still taking into account padding) as for flex layouts the the descent could in theory grow indefinitely. For all other cases the previous logic is the same.
cc: @henriqueiamarino
Screenshots
Before
After
Testing Instructions
Open the editor past the following markup in the code editor:
Verify the "Stretch" behavior is the expected one.