Make WordPress Core

Opened 13 months ago

Last modified 5 weeks ago

#59164 new defect (bug)

Twenty Nineteen : Site Title Block Color Section is not reflecting properly in Editor & Frontend Side

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

Description

In Twenty Nineteen theme,

  1. The colour selected is not reflected on the frontend side
  2. When we select the background then the colour is not reflected in the editor also.

Video of the issue generated : https://drive.google.com/file/d/1dv9C0hRltm6bLbmfvw53sSEFj5Zz_lw0/view?usp=sharing

Change History (3)

#1 @huzaifaalmesbah
13 months ago

  • Keywords needs-patch added

Thanks for the report @pitamdey
I watched the video you shared. Then I checked, I faced the same issue.

#2 @karmatosed
5 months ago

  • Milestone changed from Awaiting Review to Future Release

#3 @sabernhardt
6 weeks ago

In the iframe editor, block-library styles set links in the Site Title block to inherit the text color at a specificity of 0-1-0.

/* block-library/editor.css */
.editor-styles-wrapper :where(.wp-block-site-title a) {
  color: inherit;
}
/* block-library/style.css */
:root :where(.wp-block-site-title a) {
  color: inherit;
}

I think the editor styles might only need this to show the default blue:

.wp-block-site-title a {
	color: $color__link;
}

When users change the accent color in the Customizer, that color is added at a higher specificity:

/* from twentynineteen_custom_colors_css() */
.editor-styles-wrapper .wp-block a {
  color: hsl( 316, 100%, 33% );
}
/* from editor inline styles */
.editor-styles-wrapper .wp-elements-1 a:where(:not(.wp-element-button)) {
  color: var(--wp--preset--color--secondary);
}

The issue with the background color is separate and reported on multiple tickets (#49931, #61138, #61429, #61474).

Last edited 5 weeks ago by sabernhardt (previous) (diff)
Note: See TracTickets for help on using tickets.