Automattic / Automattic/jetpack

Related Posts: Broken alignment in Gutenberg themes

Open
#18,440 1 comment 0 reactions 0 assignees View on GitHub
[Feature] Related Posts [Pri] Normal Bug Customer Report [LEGACY]
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:
![broken](https://user-images.githubusercontent.com/905781/105105314-2bc6e400-5ab4-11eb-97d8-2341e0d292bc.png)

#### 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:
![working](https://user-images.githubusercontent.com/905781/105105404-53b64780-5ab4-11eb-9ba9-46b052d97221.png)

#### 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.