Make WordPress Core


Ignore:
Timestamp:
12/02/2016 05:19:44 AM (8 years ago)
Author:
joemcgill
Message:

Twenty Seventeen: Better handling of custom headers when no image is set.

This ensures that a standard header is shown on the front page whenever
a header video is set without a header image if the video doesn't load,
e.g., on mobile sizes or if the JS doesn't fire.

This adds a new class, .has-header-video that is added whenever the
wp-custom-header-video-loaded event is fired, which is then used to style
the custom headers along with .has-header-image whenever a header image
is available. This also changes the class name on the custom header media
wrapping div from .custom-header-image to .custom-header-media.

Props laurelfulford, joemcgill.
Fixes #38995 for 4.7.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-content/themes/twentyseventeen/inc/color-patterns.php

    r39387 r39414  
    444444.colors-custom .next.page-numbers:hover,
    445445.colors-custom.has-header-image .site-title,
     446.colors-custom.has-header-video .site-title,
    446447.colors-custom.has-header-image .site-title a,
    447 .colors-custom.has-header-image .site-description {
     448.colors-custom.has-header-video .site-title a,
     449.colors-custom.has-header-image .site-description,
     450.colors-custom.has-header-video .site-description {
    448451    color: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */
    449452}
Note: See TracChangeset for help on using the changeset viewer.