-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Tagline
block.Part of #43247
Why?
Site Tagline
block is missing border support.How?
Adds the border block support in block.json
Testing Instructions
Site Tagline
block's border is configurable via Global StylesSite Tagline
block and Apply the border stylesWatch attached video for more information.
Screenshots or screencast
site-tagline-block-border-support-video.webm