Add Text Alignment support for Button Block#70181
Add Text Alignment support for Button Block#70181Rishit30G wants to merge 1 commit 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!
Unfortunately, we are currently unable to move forward with #60763 because text alignment support cannot be overridden on block instances. See the screenshot below:
As you can see, even though the block-level alignment should be centered, the global style default value (right) is respected.
To solve this, we need to move forward with #62260, but we haven't found an ideal approach yet.
For now, let's close this PR.

What ?
Closes core/button for #60763
How ?
This PR adds the updated text alignment support in
block.jsonfor button block and moves away from the older textAlignment way which required code changes inedit.jsas wellTesting Instructions
Screenshots or screencast
Screen.Recording.2025-05-22.at.10.29.00.AM.mov