WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 2 months ago

Last modified 2 months ago

#50892 closed defect (bug) (fixed)

Some block patterns have text contrast issues with dark themes

Reported by: nrqsnchz Owned by: SergeyBiryukov
Milestone: 5.5.1 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch commit
Focuses: Cc:

Description

Moving from https://github.com/WordPress/gutenberg/issues/24391

Some block patterns are presenting text contrast issues on dark themes. The patterns with the issue are:

  • Two columns of text
  • Two columns of text with images
  • Three columns of text with buttons
  • Heading and Paragraph

These patterns have the text color of body copy hardcoded to black, which causes the aforementioned issues when viewed on a dark theme.

Attachments (9)

heading-paragraph.png (108.2 KB) - added by nrqsnchz 3 months ago.
three-columns-buttons.png (100.2 KB) - added by nrqsnchz 3 months ago.
two-columns-images.png (1.9 MB) - added by nrqsnchz 3 months ago.
two-columns.png (276.1 KB) - added by nrqsnchz 3 months ago.
fix-patterns.diff (25.4 KB) - added by nrqsnchz 3 months ago.
fix-heading-paragraph.png (128.2 KB) - added by nrqsnchz 3 months ago.
fix-three-columns-buttons.png (110.0 KB) - added by nrqsnchz 3 months ago.
fix-two-columns-images.png (1.9 MB) - added by nrqsnchz 3 months ago.
fix-two-columns.png (325.1 KB) - added by nrqsnchz 3 months ago.

Change History (17)

@nrqsnchz
3 months ago

#1 @nrqsnchz
3 months ago

  • Keywords has-patch added

#2 @nrqsnchz
3 months ago

I've uploaded a patch with a fix. It removes the hardcoded value only from body text. Patterns should now respect the theme's default text color.

I also tested on Core default themes (from Twenty Ten to Twenty Twenty) and couldn't see any issues there due to this change.

#3 @SergeyBiryukov
3 months ago

  • Component changed from General to Editor

#4 @desrosj
3 months ago

  • Milestone changed from Awaiting Review to 5.5.1

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


2 months ago

#6 @SergeyBiryukov
2 months ago

  • Keywords commit added

#7 @SergeyBiryukov
2 months ago

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

In 48864:

Editor: Remove some hardcoded text color values from patterns that have body text with no specific background color.

This ensures that the patterns respect the theme's default color for body text and avoids contrast issues, particularly in dark themes.

Props nrqsnchz, mapk, fullofcaffeine.
Fixes #50892.

#8 @SergeyBiryukov
2 months ago

In 48865:

Editor: Remove some hardcoded text color values from patterns that have body text with no specific background color.

This ensures that the patterns respect the theme's default color for body text and avoids contrast issues, particularly in dark themes.

Props nrqsnchz, mapk, fullofcaffeine.
Merges [48864] to the 5.5 branch.
Fixes #50892.

Note: See TracTickets for help on using tickets.