-
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
Cover block: Update the box-sizing attribute #25115
Conversation
Size Change: +21 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
I'm a However given that this block has shipped for a while without it, and is relatively well used, what kind of testing can we do to ensure this doesn't regress? And, perhaps a larger question, if the motivation for adding this is the padding behavior which was recently added to Cover, but is on its way to Group, should we add this property to more blocks? Which ones? |
I tested this on Twenty Twenty, Twenty Nineteen, Seedlet and Twenty Ten. These lines of CSS didn't make any difference to any of the newer themes, but on Twenty Ten, these lines fixed the display of the block which otherwise was bleeding into the sidebar. |
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.
Yep, pairing the box model with the padding feature makes for a good predictable heuristic. This needs a good testing in a few themes, but it should work great. Thanks!
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.
LGTM 👍
Tested with a few themes, didn't see any issues
Any idea why the tests are failing? |
That specific test keeps failing occasionally. I restarted it. |
1ea0a9b
to
b801d84
Compare
Description
I think we should add
box-sizing: border-box;
to the cover block. In themes with a fixed post width, the combination of a cover block with 100% width and 16px padding means that the cover block extends outside the bounds of the post content:Adding
box-sizing: border-box;
tells that block to count the padding as part of the 100% width, and prevents it bleeding out:In the other themes I tested this doesn't change anything.
How has this been tested?
Tested with TwentyTwenty and Seedlet thems
Screenshots
Types of changes
Bug fix
Checklist: