#49435 closed defect (bug) (fixed)
Twenty Twenty: inconsistent top and bottom margins for .alignwide and .alignfull on Chrome vs Safari (cross browser issue)
| Reported by: | kthmd | Owned by: | ianbelanger |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.4.2 |
| Component: | Bundled Theme | Version: | 5.3 |
| Severity: | normal | Keywords: | good-first-bug has-patch fixed-major |
| Cc: | Focuses: | css |
Description
I've noticed on the latest WordPress and twentytwenty theme that there is an inconsistency in top and bottom margins, notably Chrome ignores lines style.css:5296 and style.css:5942 - so Chrome does not have the margins, but Safari does. This seems to be quite a large layout issue cross browser.
For example, use default twentytwenty theme, go to sample page and edit, create a cover block, set to fullwidth, and notice the top and bottom margin difference in Chrome (v80) and Safari (v13)
style.css:5296
.entry-content .alignwide:not(.wp-block-group.has-background),
.entry-content .alignfull:not(.wp-block-group.has-background) {
margin-bottom: 6rem;
margin-top: 6rem;
}
style.css:5942
.entry-content > .alignwide:not(.wp-block-group.has-background),
.entry-content > .alignfull:not(.wp-block-group.has-background) {
margin-bottom: 8rem;
margin-top: 8rem;
}
Attachments (6)
Change History (21)
#1
@
6 years ago
- Component Themes → Bundled Theme
- Summary twentytwenty theme: inconsistent top and bottom margins for .alignwide and .alignfull on Chrome vs Safari (cross browser issue) → Twenty Twenty: inconsistent top and bottom margins for .alignwide and .alignfull on Chrome vs Safari (cross browser issue)
#2
@
6 years ago
- Keywords good-first-bug needs-patch added
- Milestone Awaiting Review → Future Release
- Version 5.3.2 → 5.3
#3
@
6 years ago
I can confirm kthmd that style.css:5296 and style.css:5942 are not firing on Chrome. Firefox also has the same issue.
It seems the problem is when @media (min-width: 1000px) or @media (min-width: 700px).
#4
@
6 years ago
- Keywords has-patch added; needs-patch removed
The cover block was looking good in between the post but not on the top because of the 8rem padding of div.post-inner element and an additional margin of the cover block.
Solved the issue by giving margin-top: 0; when it will be on the top of the post, also taken care of bottom margin.
This ticket was mentioned in Slack in #core by nikhilbhansi. View the logs.
6 years ago
#7
@
6 years ago
- Keywords needs-refresh added
Thanks for your patch @nikhilbhansi, however I would prefer that we avoid using !important if possible. Could yo see if there is a solution that does not need the !important flag.
#8
@
6 years ago
@ianbelanger avoided !important by adding specificity.
Cover Blocks which are in the middle of posts does not have any negative effects.
#9
@
6 years ago
- Keywords needs-refresh removed
- Owner set to
- Status new → reviewing
Thanks @nikhilbhansi for the updated patch. I am reviewing now and if all goes well I will commit it.
#11
@
6 years ago
- Keywords fixed-major added
- Milestone 5.5 → 5.4.2
- Resolution fixed
- Status closed → reopened
Reopening for backport.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Chrome