-
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
Remove the right margin for the right-most list items in the lastest posts block #25688
Conversation
Size Change: +84 B (0%) Total Size: 1.17 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.
This looks good to me and works.
That being said, I think it would be a lot better if we refactored these to use CSS-grid instead. This way we wouldn't even need breakpoints, and we'd just use the grid-gap.
Yeah, I agree. This is a decent step forward in the meantime though. Thanks for the review! |
I came across this while building the Latest Posts block's theme styles for Twenty Twenty: WordPress/twentytwentyone#153.
Currently, the Latest Posts block's grid mode includes a right-margin declaration for the right-most items in the grid. This causes all items to be slightly off to the left:
This PR adds an additional style to remove the right-margin from that item. It also re-adjusts the width of each item to account for the change:
I tested in Twenty Twenty and Twenty Nineteen, and didn't see any issues. The width changes didn't seem to be picked up in the editor for Twenty because of the theme's more specific styles. But it didn't cause any issues there, and it looked great on the front end.