Buttons: Enable Fit / Grow / Fixed width controls using layout support#76998
Buttons: Enable Fit / Grow / Fixed width controls using layout support#76998sarthaknagoshe2002 wants to merge 2 commits intoWordPress:trunkfrom
Conversation
|
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. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR!
If my understanding is correct, I don't think we can simply replace width support with layout support because it would break backward compatibility. It might be possible to migrate to layout support, but that would likely require a fairly complex migration process.
|
I think @t-hamano is right: removing a block support would cause regressions. Here's what happens with existing block markup containing button widths:
Also the control isn't set up to support theme presets, which was one of the defining motivations behind #74242 if I've not mistaken:
Not saying that harmonizing layout and width is impossible, but it requires a little more groundwork. |


What?
Closes #76531
Why?
Currently, Button blocks inside a Buttons block do not expose the same sizing controls (Fit / Grow / Fixed) that are available when placed inside a Row block.
As a result users cannot proportionally size multiple buttons.
How?
The PR sets "allowSizingOnChildren" to true & removes existing width control.
Testing Instructions
Screenshots or screencast