-
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
Padding Edit: Fix handling of custom unit theme setting #28603
Conversation
Size Change: -36 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
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.
It works and the code is nice, thanks for fixing it.
50c0807
to
76bee52
Compare
I see there are some test failures that were related to the PHP version in use and that are fixed on master. I've gone ahead and rebased this PR so it's ready to land as soon as tests pass. @noisysocks This is a fix to something that's not a regression in 9.9, it existed prior. However, it's still a nice fix to land in 5.7. Not sure how should we go about it? Should we port it to the Gutenberg 9.9 release or should we wait and port it to WordPress 5.7 beta as a bugfix later? |
Meanwhile I can confirm that if If a block padding is first created with a custom unit, and the theme support is removed, -picture switching themes, |
Tagging this to "backport to beta" as per this comment. |
Yep, add the backport label (you did it!) and I will include it in one of the 5.7 betas. |
This update fixes the
Padding
style controls as it relates to thecustom-units
theme setting.The solution involved ensuring the padding controls used the
useCustomUnit
hook, which gracefully handles consolidating the theme setting for custom units.Resolves #27829
How has this been tested?
Locally in Gutenberg.
npm run dev
add_theme_support( 'custom-units' );
from the themefunctions.php
add_theme_support( 'custom-units' );
from the themefunctions.php
Checklist: