-
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
Fix: Button border radius 0 does not appear, and undefined border appears as 0 #22393
Conversation
@@ -43,7 +43,7 @@ $blocks-button__height: 56px; | |||
// the first selector is required for old buttons markup | |||
|
|||
.wp-block-button.no-border-radius, | |||
.wp-block-button__link.wp-block-button.no-border-radius { | |||
.wp-block-button .wp-block-button__link.no-border-radius { |
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.
Can we remove .wp-block-button
here?
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.
Suggestion applied :)
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.
Suggestion applied :)
@ItsJonQ this seems a bit related to the "reset" behaviors we were discussing? |
Size Change: +275 kB (24%) 🚨 Total Size: 1.11 MB
ℹ️ View Unchanged
|
32d8d10
to
dc4607c
Compare
@jorgefilipecosta Ah! Thanks for catching this! I spotted a bug in the guard for the Before: if ( ! isFinite( value ) ) {
return null;
} After: if ( typeof value !== 'number' ) {
return null;
} This should handle Thank you! 🙏 |
Thank you for the enhancement @ItsJonQ. It worked great on my tests 👍 |
Fixes: #22367
This PR fixes a wrong CSS rule that made the border 0 radius in button not appear as expected.
It also fixes a bug, when the border-radius is not set (it is undefined and the theme value set with CSS is being used) we were displaying 0 as the border-radius by default, in that case, we should show the input empty.
How has this been tested?
I enabled 2019 theme.
I added a button I set the border-radius to 0 and verified it appeared as expected on the editor and on the front end.
I added a button in 2019 (by default the button has some border) I verified the border did not appear as 0.