-
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
Add margin and padding supports to Audio block. #43351
Conversation
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.
This is generally working well for me, but I noticed that for it to work in an expected way in TwentyTwentyTwto, I needed to add a box-sizing: border-box
rule in order for the padding to work, because of the .wp-block-audio
classname's width: 100%
rule.
Without that, here's how the Audio block sits against a Group block with the same padding setting:
From a quick skim of other block CSS, it looks like most other blocks that implement padding also include a box-sizing: border-box
rule. Shall we add it in for this one, too?
It looks like for other blocks, it's included with a comment like this one:
// This block has customizable padding, border-box makes that more predictable. |
Thanks for reviewing @andrewserong ! Yeah, that makes sense, I'll add it in. |
Size Change: +146 B (0%) Total Size: 1.24 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.
Thanks @tellthemachines, that's working nicely for me now, and the styles appear to be output correctly in global styles, too.
LGTM! ✨
What?
Addresses part of #43243.
Why?
For consistency of design tools between blocks.
How?
Adds margin and padding supports to Audio block.
Testing Instructions
Screenshots or screencast