Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#38980 closed defect (bug) (fixed)

Twenty Seventeen: Header text color isn't always applied

Reported by: ocean90's profile ocean90 Owned by: laurelfulford's profile laurelfulford
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.7
Component: Bundled Theme Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

This is an issue with the CSS specificity.

Issue 1:

  • Clear existing theme mods (wp eval "remove_theme_mods();")
  • Go to the customizer and the colors section
  • Switch to "Custom" and choose a color
  • Notice that the preview has the color applied
  • Click Save & Publish
  • Close customizer and view the front page
  • Bug: The header text has the default color

Issue 2:

  • Clear existing theme mods (wp eval "remove_theme_mods();")
  • Go to the customizer and remove the header image
  • Default header color is now #222
  • Go to the colors section
  • Change header text color to red
  • Click Save & Publish
  • Reload customizer (CMD/CTRL+R)
  • Go to the colors section
  • Select "Dark"
  • Bug: The preview has the default color and the header text control still shows red
  • Change header text color to yellow
  • Notice that the preview has the color applied
  • Click Save & Publish
  • Close customizer and view the front page
  • Bug: The header text has the default color

Attachments (3)

38980-issue1.png (69.4 KB) - added by ocean90 8 years ago.
38980-issue2.png (157.3 KB) - added by ocean90 8 years ago.
38980.patch (978 bytes) - added by laurelfulford 8 years ago.

Download all attachments as: .zip

Change History (10)

@ocean90
8 years ago

@ocean90
8 years ago

#1 @davidakennedy
8 years ago

  • Owner set to laurelfulford
  • Status changed from new to assigned

Thanks for the report!

Looks like this is an issue in the CSS applied if you select a custom header text color. This:

.site-title a,
	body.has-header-image .site-title a,
	.site-description,
	body.has-header-image .site-description {
		color: #<?php echo esc_attr( $header_text_color ); ?>;
	}

Needs to also have the additional color scheme classes: .colors-dark and .colors-custom.

@laurelfulford
8 years ago

#2 @laurelfulford
8 years ago

  • Keywords has-patch added; needs-patch removed

In 38980.patch, I made the custom-header.php selectors a lot more specific as suggested. It seems to do the trick - let me know if it needs further adjusting!

#3 @ocean90
8 years ago

  • Keywords commit dev-feedback added

38980.patch looks good to me.

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


8 years ago

#5 @helen
8 years ago

  • Keywords dev-reviewed added; dev-feedback removed

#6 @davidakennedy
8 years ago

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

In 39397:

Twenty Seventeen: Make sure header text color is applied when color schemes are active.

Props laurelfulford, ocean90.

Fixes #38980.

#7 @helen
8 years ago

In 39398:

Twenty Seventeen: Make sure header text color is applied when color schemes are active.

Props laurelfulford, ocean90.

Merges [39397] to the 4.7 branch.
Fixes #38980 for 4.7.

Note: See TracTickets for help on using tickets.