WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 4 months ago

#47340 closed defect (bug) (fixed)

Twenty Nineteen: Revise Latest Posts block styles to support post content options.

Reported by: kjellr Owned by: SergeyBiryukov
Milestone: 5.2.3 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch has-screenshots fixed-major needs-testing
Focuses: Cc:
PR Number:

Description

The Latest Posts block in Gutenberg has recently been updated to include the option of showing post content in addition to post titles and dates:

https://github.com/WordPress/gutenberg/pull/14627

Because Twenty Nineteen's stylesheet is written to target all text inside the li items in this block, the post content is not formatted properly:

https://cldup.com/b_HaHBlSq2-3000x3000.png

The attached patch cleans up those styles, and also adjusts the text style for the post date, so that it matches one of the theme's standard font sizes:

https://cldup.com/K9Z7kgnH13-3000x3000.png

The patch includes both front end and editor styles, and shouldn't negatively effect any other blocks that share some of these styles (the Archives and Categories blocks).

Attachments (3)

47340.diff (8.4 KB) - added by kjellr 7 months ago.
47340.1.diff (10.4 KB) - added by kjellr 6 months ago.
47340.2.diff (10.9 KB) - added by ianbelanger 6 months ago.
Refreshed patch

Download all attachments as: .zip

Change History (12)

@kjellr
7 months ago

#1 @kjellr
7 months ago

Update: I've added a fresh version of the patch to be compatible with the changes in the following two Gutenberg updates:

https://github.com/WordPress/gutenberg/pull/15758
https://github.com/WordPress/gutenberg/pull/15760

#2 @ianbelanger
6 months ago

  • Keywords needs-refresh added

Maybe I am missing something, but it appears that there aren't any front-end styles in your patch. I see the RTL styles, but none for LTR. Patch works great for the back-end though.

@kjellr
6 months ago

#3 @kjellr
6 months ago

  • Keywords needs-refresh removed

Oh, very weird! Thanks for catching that. I've added a recompiled patch that includes the changes to style.css: 47340.1.diff.

#4 @ianbelanger
6 months ago

No problem @kjellr, I tried testing your latest patch and it wouldn't apply. The file paths were missing from the diff, so I refreshed it. Uploading soon.

@ianbelanger
6 months ago

Refreshed patch

#5 @kjellr
6 months ago

😄Thank you! Must've forgot to cd back out of the Twenty Nineteen directory after re-compiling.

#6 @SergeyBiryukov
4 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 45761:

Twenty Nineteen: Revise Latest Posts block styles to support post content options.

Props kjellr, ianbelanger.
Fixes #47340.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


4 months ago

#8 @JeffPaul
4 months ago

  • Keywords fixed-major needs-testing added
  • Milestone changed from 5.3 to 5.2.3
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening this so it can be back-ported to the 5.2 branch, also needs testing to validate if this ticket is good to land in 5.2.3.

#9 @SergeyBiryukov
4 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 45845:

Twenty Nineteen: Revise Latest Posts block styles to support post content options.

Props kjellr, ianbelanger.
Merges [45761] to the 5.2 branch.
Fixes #47340.

Note: See TracTickets for help on using tickets.