Automattic / Automattic/jetpack
Related Posts: Broken alignment in Gutenberg themes
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
#### Steps to reproduce the issue
1. Activate Varia or Seedlet on an AT site
2. Enable related posts by selecting **My Site > Marketing > Traffic**
3. Access a blog post
4. Notice the broken alignment:

#### Culprit
```
#jp-relatedposts {
display: none;
padding-top: 1em;
margin: 1em 0;
position: relative;
clear: both;
}
```
#### What I expected
I expected it to be working fine, like in Twenty Twenty One:

#### What happened instead
It's broken in all Gutenberg themes. Twenty Twenty One has a fix in a Jetpack compat file:
https://github.com/Automattic/jetpack/blob/master/projects/plugins/jetpack/modules/theme-tools/compat/twentytwentyone.css
#### Temporary fix
I will add a fix in Varia & Seedlet
#### Proposed permanent fix
This should really be taken care in Jetpack Related Posts CSS. I'm just not sure how, just yet.
Contributor guide
Research direction
Start by comparing the Related Posts CSS with the referenced compat/twentytwentyone.css file and reproduce the issue using Varia or Seedlet with Related Posts enabled. Verify the alignment on Gutenberg themes and confirm that the permanent Jetpack CSS change fixes the layout without relying on theme-specific temporary fixes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, wordpress
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100