Make WordPress Core

Opened 19 months ago

Last modified 2 months ago

#61022 new defect (bug)

Twenty Eleven: "Follow Blog" pattern has black text on black background

Reported by: poena's profile poena Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 6.4
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

In Twenty Eleven, the custom pattern "Follow Blog" uses a cover block with a black overlay and no image.

In WordPress 6.5, this results in black text over black background, and the text is unreadable.

-I did not test the pattern on previous versions of WordPress.

Testing Instructions
With the default theme color settings:

Create a new post or page.
Open the block inserter.
Select Patterns.
From the pattern category list, select "Twenty Eleven".
Insert the pattern called "Follow Blog": You may need to focus on or hover over the pattern to find the pattern name.

Confirm that both the pattern preview, and the inserted pattern, has black text on black background.

Attachments (1)

twentyeleven-follow-blog-pattern.png (383.6 KB) - added by poena 19 months ago.

Download all attachments as: .zip

Change History (6)

#1 @mayur8991
19 months ago

  • Keywords needs-patch added

#2 @sabernhardt
19 months ago

  • Version changed from trunk to 6.4

I experienced the same with 6.5 and 6.4, but not with 6.3 and some earlier versions. The block editor had set the block's text color to white when the pattern was added in 5.8 ([51103]). This happens on the front end and in the editor, whether the theme uses its Light or Dark color scheme.

In more recent versions, the Cover block in the pattern has an is-light class, even with the black overlay.

I was able to assign a white text color to the Cover block in WordPress 6.5, but if that is used in the registered pattern, older versions would give the 'unexpected or invalid content' error.

Another possibility to consider is converting it to a Group block.

#3 @karmatosed
19 months ago

  • Milestone changed from Awaiting Review to Future Release

#4 @poena
18 months ago

I think this should be the very last resort, but maybe the theme needs to register different patterns on different WP versions.

This ticket was mentioned in PR #9808 on WordPress/wordpress-develop by @lakshyajeet.


2 months ago
#5

  • Keywords has-patch added; needs-patch removed

Trac ticket: https://core.trac.wordpress.org/ticket/61022

This PR fixes "Follow Blog Pattern" but explicitly adding the Theme's "white" color as the text color.

### Before:
https://github.com/user-attachments/assets/58a0a97b-e44b-4f2f-8704-aa407868b774

### After:
https://github.com/user-attachments/assets/0b844370-ba17-4dee-a8cf-1af12623b2dc

Note: See TracTickets for help on using tickets.