Make WordPress Core


Ignore:
Timestamp:
12/02/2016 05:19:44 AM (7 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/assets/css/ie9.css

    r39215 r39414  
    55
    66.has-header-image.twentyseventeen-front-page .custom-header,
    7 .has-header-image.home.blog .custom-header {
     7.has-header-video.twentyseventeen-front-page .custom-header,
     8.has-header-image.home.blog .custom-header,
     9.has-header-video.home.blog .custom-header {
    810    height: 300px;
    911}
    1012
    11 .has-header-image .custom-header-image img,
    12 .has-header-image .custom-header-image video,
    13 .has-header-image .custom-header-image iframe {
     13.has-header-image .custom-header-media img,
     14.has-header-video .custom-header-media video,
     15.has-header-video .custom-header-media iframe {
    1416    min-width: 100%;
    1517}
     
    1820
    1921    .has-header-image.twentyseventeen-front-page .custom-header,
     22    .has-header-video.twentyseventeen-front-page .custom-header,
    2023    .has-header-image.home.blog .custom-header,
    21     .twentyseventeen-front-page.has-header-image .custom-header-image,
    22     .home.blog.has-header-image .custom-header-image,
     24    .has-header-video.home.blog .custom-header,
     25    .twentyseventeen-front-page.has-header-image .custom-header-media,
     26    .home.blog.has-header-image .custom-header-media,
    2327    .panel-image {
    2428        height: 700px;
     
    2933
    3034    .has-header-image.twentyseventeen-front-page .custom-header,
     35    .has-header-video.twentyseventeen-front-page .custom-header,
    3136    .has-header-image.home.blog .custom-header,
    32     .twentyseventeen-front-page.has-header-image .custom-header-image,
    33     .home.blog.has-header-image .custom-header-image,
     37    .has-header-video.home.blog .custom-header,
     38    .twentyseventeen-front-page.has-header-image .custom-header-media,
     39    .home.blog.has-header-image .custom-header-media,
    3440    .panel-image {
    3541        height: 1000px;
Note: See TracChangeset for help on using the changeset viewer.