-
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
Fix centered buttons margins #21947
Fix centered buttons margins #21947
Conversation
Size Change: -4 B (0%) Total Size: 816 kB
ℹ️ View Unchanged
|
@@ -1,10 +1,10 @@ | |||
.wp-block[data-align="center"] .wp-block-button { | |||
.wp-block[data-align="center"] > .wp-block-button { |
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.
Is it some sort of block nesting issue that was causing this? What's the difference in using direct descendent selector?
(My worry is that this "fixes" by just... never matching anything)
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.
yes, the alignment of the "buttons" block was being applied to the "button" block.
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.
The same issue could have happened if you rendered the buttons block inside a "centered" group (not sure that's possible in the UI)
Small regression introduced by #21822
The buttons margins were collapsed if the buttons block was centered.
Testing instructions