-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Loginout : Add border and color block support #63550
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.
Thanks for putting this PR together @akasunil, it's great to see more blocks adopting the available block supports! 👍
The border support is testing well for me on the login/out block.
✅ Editor
✅ Frontend
✅ Logged in and out
✅ Theme.json/global styles
I think we might want to make the border controls all display by default though. This has been the general approach to date for blocks adopting this support and would further improve the consistency of design tools in Gutenberg.
What do you think?
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 iterating on this 👍
I missed double checking the login/out block within different contexts last time I reviewed, such as within a Group block with custom content width. I think this block might also benefit from applying box-sizing: border-box
.
Apologies that this is a bit of a recurring theme on your block support adoption PRs. If it is any consolation, there are a few of my own I'm going to need to go and revisit as well.
Without border-box sizing | With border-box sizing |
---|---|
In the above screenshots, you can see how padding and borders push the login/out block beyond the bounds that the parent Group is trying to enforce on its content.
@aaronrobertshaw I apologize for not noticing this before. Since this PR only add supports of border styles, my attention was solely on those. |
I think we should check all blocks with layout supports. |
No apologies needed 🙂 It's easy to miss that adding borders can impact the actual width of a block depending on its context. I know I did to start with as well. |
…add/loginout-border-support
Size Change: +2.77 kB (+0.16%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
@aaronrobertshaw I have added video recording of block styles testing in PR description |
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 the iteration on this @akasunil 👍
✅ Border and color global styles work
✅ Block instance styles for border and color apply correctly (except issue below)
✅ Box sizing allows parent block to enforce widths
The one issue I noticed was not being able to override a gradient from global styles with a simple background color on the block instance. This is a broader, preexisting problem and not introduced here. It can be a separate follow-up.
LGTM 🚢
Screen.Recording.2024-07-30.at.5.15.51.PM.mp4
Looks like its issue of different css property used for simple and gradient background, it uses Blog-Home-.-Template-.-gutenberg-.-Editor-.-WordPress.webmWill create separate issue for this if its not already created. |
What?
Add border and color block support to the LoginOut block.
Part of
#43247
#43245
Why?
The block is missing border and color support.
How?
Adds the border and color block support in block.json
Testing Instructions
Login/out
block's styles is configurable via Global StylesLogin/out
block and Apply the stylesScreenshots or screencast
Blog-Home-.-Template-.-gutenberg-.-Editor-.-WordPress.6.webm