Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#50892 closed defect (bug) (fixed)

Some block patterns have text contrast issues with dark themes

Reported by: nrqsnchz's profile nrqsnchz Owned by: sergeybiryukov's profile 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 4 years ago.
three-columns-buttons.png (100.2 KB) - added by nrqsnchz 4 years ago.
two-columns-images.png (1.9 MB) - added by nrqsnchz 4 years ago.
two-columns.png (276.1 KB) - added by nrqsnchz 4 years ago.
fix-patterns.diff (25.4 KB) - added by nrqsnchz 4 years ago.
fix-heading-paragraph.png (128.2 KB) - added by nrqsnchz 4 years ago.
fix-three-columns-buttons.png (110.0 KB) - added by nrqsnchz 4 years ago.
fix-two-columns-images.png (1.9 MB) - added by nrqsnchz 4 years ago.
fix-two-columns.png (325.1 KB) - added by nrqsnchz 4 years ago.

Change History (17)

@nrqsnchz
4 years ago

#1 @nrqsnchz
4 years ago

  • Keywords has-patch added

#2 @nrqsnchz
4 years 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
4 years ago

  • Component changed from General to Editor

#4 @desrosj
4 years ago

  • Milestone changed from Awaiting Review to 5.5.1

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


4 years ago

#6 @SergeyBiryukov
4 years ago

  • Keywords commit added

#7 @SergeyBiryukov
4 years 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
4 years 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.