Make WordPress Core

Changeset 33092


Ignore:
Timestamp:
07/06/2015 05:26:02 PM (11 years ago)
Author:
obenland
Message:

Twenty Fifteen: Display sidebar background color with Header Image.

If the header image has a transparent background, the sidebar background color
should be visible. With the background shorthand it could never be over set
on the front-end however.

Props valendesigns.
Fixes #31460.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/inc/custom-header.php

    r30932 r33092  
    134134        ?>
    135135                .site-header {
    136                         background: url(<?php header_image(); ?>) no-repeat 50% 50%;
     136
     137                        /*
     138                         * No shorthand so the Customizer can override individual properties.
     139                         * @see https://core.trac.wordpress.org/ticket/31460
     140                         */
     141                        background-image: url(<?php header_image(); ?>);
     142                        background-repeat: no-repeat;
     143                        background-position: 50% 50%;
    137144                        -webkit-background-size: cover;
    138145                        -moz-background-size:    cover;
    … …  
    143150                @media screen and (min-width: 59.6875em) {
    144151                        body:before {
    145                                 background: url(<?php header_image(); ?>) no-repeat 100% 50%;
     152
     153                                /*
     154                                 * No shorthand so the Customizer can override individual properties.
     155                                 * @see https://core.trac.wordpress.org/ticket/31460
     156                                 */
     157                                background-image: url(<?php header_image(); ?>);
     158                                background-repeat: no-repeat;
     159                                background-position: 100% 50%;
    146160                                -webkit-background-size: cover;
    147161                                -moz-background-size:    cover;
Note: See TracChangeset for help on using the changeset viewer.