Skip to content

Buttons: Add support for text color at the Buttons block level#71411

Open
im3dabasia wants to merge 2 commits intoWordPress:trunkfrom
im3dabasia:try/text-color-option-buttons-block
Open

Buttons: Add support for text color at the Buttons block level#71411
im3dabasia wants to merge 2 commits intoWordPress:trunkfrom
im3dabasia:try/text-color-option-buttons-block

Conversation

@im3dabasia
Copy link
Copy Markdown
Contributor

What?

This PR adds support for text color at the Buttons block level, similar to what is already available on individual Button block
Closes #57606

Why?

There is a need to provide a text color option at the Buttons block level so that all inner Button blocks can consistently inherit the same color from the parent, instead of setting the color on each Button individually.

Additionally, when Buttons are placed inside a Group and the Group has a text color applied, the Buttons block currently does not inherit this color. This PR fixes that inheritance issue as well.

How?

  • Enabled text color support in packages/block-library/src/buttons/block.json.

Testing Instructions

  • Add a Buttons block.
  • In block settings, set a text or background color → confirm styles apply.

  • Add a Buttons block inside a Group block.
  • Apply a text color to the Group block → confirm the Buttons block inherits the color.

Testing Instructions for Keyboard

Screenshots or screencast

Before

The button block is not inheritting colors given from group block. Intuitively one would want everything inside the group block to have the color chosen by the Group block

image

After

Now, the Button correctly inherits the color from the Group block. If a color is set at the Buttons block level, that color is used instead. Lastly, if a color is applied directly to the Button block, that color is applied.

Screen.Recording.2025-08-29.at.3.18.23.PM.mov

this would have the highest priority

@im3dabasia im3dabasia marked this pull request as ready for review August 29, 2025 11:00
@github-actions
Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: MadtownLems <madtownlems@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@shail-mehta shail-mehta added [Type] Enhancement A suggestion for improvement. [Block] Buttons Affects the Buttons Block labels Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Buttons Affects the Buttons Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Support for Button Colors at the ButtonS Block Level

2 participants