Site Tagline: Add border block support #63778
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. |
aaronrobertshaw
left a comment
There was a problem hiding this comment.
Thank you for the PR @akasunil 👍
As we discussed on the other border support PRs recently. Blocks adopting the border (or padding) block support need to have a box-sizing: border-box style so they will honour any width imposed by a parent block.
The screenshot below shows a Group block setting the width of its content to 500px and inspecting the Site Tagline block inside it. You'll see that the border I applied causes the block to exceed the dimensions it should have.
|
Size Change: +5.41 kB (+0.31%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 2de26c8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10053824818
|
aaronrobertshaw
left a comment
There was a problem hiding this comment.
Thanks for adding the box-sizing @akasunil 👍
There's been some feedback on the default display of controls in the recent round of block support adoption PRs. For niche use cases such as this one, it's been suggested to make the new controls optional.
I guess the best clue is if the dimension and spacing controls are optional, then the border controls should be as well.
I've left a suggestion in an inline comment that you should be able to commit if you agree. At that point, I think this is ready.
|
Thank you @aaronrobertshaw
ill follow that |
aaronrobertshaw
left a comment
There was a problem hiding this comment.
Thanks for your patience iterating on this PR 👍
✅ Global border styles apply correctly
✅ Block instance styles override global styles
✅ Box sizing takes into account border when parent enforces width


What?
Add border block support to the
Site Taglineblock.Part of #43247
Why?
Site Taglineblock is missing border support.How?
Adds the border block support in block.json
Testing Instructions
Site Taglineblock's border is configurable via Global StylesSite Taglineblock and Apply the border stylesWatch attached video for more information.
Screenshots or screencast
site-tagline-block-border-support-video.webm