Make WordPress Core

Opened 3 years ago

Last modified 13 months ago

#59164 new defect (bug)

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

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

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 (4)

#1 @huzaifaalmesbah
3 years 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
2 years ago

  • Milestone Awaiting ReviewFuture Release

#3 @sabernhardt
2 years 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).

Version 0, edited 2 years ago by sabernhardt (next)
Note: See TracTickets for help on using tickets.