Make WordPress Core

Opened 11 months ago

Closed 9 months ago

#56214 closed defect (bug) (fixed)

Twenty Twenty: links do not inherit user-defined text colors in the editor

Reported by: sabernhardt's profile sabernhardt Owned by: audrasjb's profile audrasjb
Milestone: 6.1 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-screenshots has-patch commit
Focuses: css Cc:

Description

The front-end styles set the text color for links to inherit inside a block with a specific text color. In the editor, these links still use the standard link color.

Steps to reproduce:

  1. Activate the Twenty Twenty theme.
  2. Create a new post or open the Widgets editor.
  3. Create a rich text block such as a Paragraph or a Heading.
  4. Enter text in that block and add a link to part of that text.
  5. In the sidebar, choose a Text color for the block. It can be one of the theme presets or a custom color.
  6. Notice that the editor displays the link in the theme accent color instead of the color you chose.
  7. Save the post or widget and view the front end. The link color should match the color of the rest of the text in the block.

Attachments (7)

56214.diff (1.0 KB) - added by sabernhardt 11 months ago.
2020-link-color-editor-with-patch.png (38.8 KB) - added by sabernhardt 11 months ago.
paragraph block in editor, before applying patch
2020-link-color-inherit-front.png (4.0 KB) - added by sabernhardt 11 months ago.
paragraph block on front
2020-link-color-editor-with-patch.2.png (38.0 KB) - added by sabernhardt 11 months ago.
paragraph block in editor, with the patch
Capture d’écran 2022-09-14 à 12.07.49.png (186.1 KB) - added by audrasjb 9 months ago.
Before patch
Capture d’écran 2022-09-14 à 12.09.00.2.png (137.9 KB) - added by audrasjb 9 months ago.
Before/after patch : front end remains the same
Capture d’écran 2022-09-14 à 12.08.52.png (209.8 KB) - added by audrasjb 9 months ago.
After patch (editor)

Download all attachments as: .zip

Change History (12)

@sabernhardt
11 months ago

@sabernhardt
11 months ago

paragraph block in editor, before applying patch

@sabernhardt
11 months ago

paragraph block on front

@sabernhardt
11 months ago

paragraph block in editor, with the patch

#1 @sabernhardt
11 months ago

  • Keywords has-screenshots has-patch added

The first image's filename is wrong, but I re-attached each image so the order would be correct.

#2 @webcommsat
11 months ago

I can replicate this issue and the patch works for me. Really helpfully set out information so easier to follow thanks @sabernhardt

#3 @sabernhardt
11 months ago

#56255 was marked as a duplicate.

@audrasjb
9 months ago

Before/after patch : front end remains the same

@audrasjb
9 months ago

After patch (editor)

#4 @audrasjb
9 months ago

  • Keywords commit added
  • Owner set to audrasjb
  • Status changed from new to accepted

Works fine. Self assigning for commit.

#5 @audrasjb
9 months ago

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

In 54153:

Twenty Twenty: Ensure link color is inherited from paragraph in the editor.

This changeset improves link colors consistency between front-end and the editor.

Props sabernhardt, webcommsat, audrasjb.
Fixes #56214.

Note: See TracTickets for help on using tickets.