Make WordPress Core

Opened 6 weeks ago

Closed 6 weeks ago

#62636 closed defect (bug) (duplicate)

Twenty Twenty-One : Latest Comment Block anchor tag color differs on frontend and editor on adding background color

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

Description

Their is inconsistency in the anchor tag's color in the editor and the frontend, when we add background color in the block. Below are the steps to reproduce the issue.

Steps to Reproduce:

  1. Activate the Twenty Twenty-One theme.
  2. Create a new post and add a Latest Comments block.
  3. Set a background color using the inspector controls.
  4. Set a text color using the inspector controls.
  5. Observe the inconsistency between color in the editor and the frontend.
  6. Change the link color in the editor; note that the changes are not visible in the editor but are applied on the frontend.

Additional Supplements:
Reference Video: https://drive.google.com/file/d/1JzrRiKhTubFtMbMc7_eOzqhn0i8uIwB8/view

Change History (5)

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


6 weeks ago
#1

  • Keywords has-patch added

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

There was inconsistency in the text and anchor tag colors when the background was added in the latest comments block.

### Steps to Reproduce:

  1. Activate the Twenty Twenty-One theme.
  2. Create a new post and add a Latest Comments block.
  3. Set a background color using the inspector controls.
  4. Set a text color using the inspector controls.
  5. Observe the inconsistency between color in the editor and the frontend.
  6. Change the link color in the editor; note that the changes are not visible in the editor but are applied on the frontend.

### Before :

https://github.com/user-attachments/assets/febfe9b7-a8fd-45c9-9beb-a2ec0d0bf6ba

### After:

https://github.com/user-attachments/assets/1360245e-021b-4911-9097-dded0cd653a0

#2 @im3dabasia1
6 weeks ago

  • Keywords needs-testing has-screenshots added

Attaching some screenshots for reference:

Notice the inconsistency in the text color of anchor tags between the editor and the frontend. Additionally, observe that the link color set to red in the inspector controls is not reflected in the editor, where it remains the default black color.

Editor Side Screenshot:

https://i.postimg.cc/cHrzW6Xr/Screenshot-2024-12-03-at-4-08-25-PM.png

Frontend Side Screenshot:

https://i.postimg.cc/FKP6w0bM/Screenshot-2024-12-03-at-4-08-46-PM.png

#3 @sainathpoojary
6 weeks ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/7938

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.26
  • Server: nginx/1.27.3
  • Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.26)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-One 2.4
  • MU Plugins: None activated
  • Plugins: Test Reports 1.2.0

Actual Results

✅ Issue resolved with patch.

Supplemental Artifacts

Before:

https://utfs.io/f/PL8E4NiPUWyOmljYuVklrLsNmfguwi69VUazeO2chToFXQKn

After:

https://utfs.io/f/PL8E4NiPUWyO0wIEfurm4XQraiwSMvRu9VZ1yNCOA2kz8EBx

@mukesh27 commented on PR #7938:


6 weeks ago
#4

Nice catch! Removing the CSS is not ideal solution as its common CSS that use for other block also.

Ping @carolinan

#5 @poena
6 weeks ago

  • Keywords needs-testing removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Severity changed from minor to normal
  • Status changed from new to closed

Duplicate of #56075.

Hi @im3dabasia1 This is a duplicate of https://core.trac.wordpress.org/ticket/56075

The theme was developed before all these new color options were available, and it has not been updated to support them.
The theme has a feature where the text and link color is applied with CSS variables.
The colors change depending on the background color and on the dark mode option, to make sure that the theme is accessible.

The difficulty is that the theme colors must work on both old versions of WordPress and newer.
The theme supports WordPress version 5.3 and newer.

@mukesh27 is also correct, changes should be limited to the scope of the ticket and not affect other
parts of the theme.

Note: See TracTickets for help on using tickets.