-
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
Login/out: add spacing support #45147
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
Flaky tests detected in 652fae1. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5517930788
|
Left and right margin isn't doing anything in the block editor if "Inner blocks use content width" is enabled. How should we handle it? Only enable vertical margin? |
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 continuing to chip away at design tool adoption @carolinan 👍
Left and right margin isn't doing anything in the block editor if "Inner blocks use content width" is enabled. How should we handle it? Only enable vertical margin?
Other blocks still adopt support for horizontal margins as individual blocks can be nested within a container block. In that case, the individual block isn't constrained by layout styles.
With regards to this PR, the spacing support styles for this block are working as I'd expect them to.
There's one small tweak I think needs to be made though. With #52256 blocks such as this one are having their dimension controls hidden by default. I think we should do the same here.
I've left the suggested tweak as an inline comment.
Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com>
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.
LGTM and is working as advertised 👍
The spacing controls are now hidden by default and match other blocks.
Thanks for your patience on this @carolinan 🙇
Got to catch them all... I mean, fix them all ;) Even if it takes time. |
What?
Adds margin and padding support to the login/out block.
Why?
For consistency. Part of #45147.
How?
The PR adds spacing support to block.json.
Testing Instructions
Make sure that the active theme supports spacing, for example, in theme.json.
Create a new post or page.
Add login/out block.
Confirm that there is a dimension panel, and that the margin and padding settings are available but not enabled by default.
Test the margin and padding settings in the editor and front.
-Go to the Site Editor, add a login/out block, and change the margin and padding via the block settings in the Styles sidebar.
-Adjust the spacing and margin via theme.json.
Example theme.json code: add this to styles > blocks:
Screenshots or screencast
login-out.mp4