Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Curious why this changed so much though?
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.
I found that both the
display
andwidth
properties were unnecessary. The former was already set bystyle.scss
, and the latter was alreadyauto
by default. (And the editor never overrode it.) I tested with various alignments to make sure everything worked as expected.I also found that the selector had a lot more specificity than it actually needed, so I simplified that. Notably, I chose to point at just the
wp-block
class for the children, to make it easier for 3rd-party button blocks to be inserted and styled correctly in the Buttons block. I almost just went with a.wp-block-buttons > *
selector, but that turned out to not have enough specificity to override themargin-left
value being set by the editor in some cases.