Make WordPress Core

Changeset 30564


Ignore:
Timestamp:
11/25/2014 02:46:13 PM (12 years ago)
Author:
iandstewart
Message:

Twenty Fifteen: a shorter header on small screens when there is no header text or header image looks more correct.

Props iamtakashi, fixes #30326.

Location:
trunk/src/wp-content/themes/twentyfifteen
Files:
2 edited

Legend:

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

    r30327 r30564  
    9090        <style type="text/css" id="twentyfifteen-header-css">
    9191        <?php
     92                // Short header for when there is no Custom Header and Header Text is hidden.
     93                if ( empty( $header_image ) && ! display_header_text() ) :
     94        ?>
     95                .site-header {
     96                        padding-top: 14px;
     97                        padding-bottom: 14px;
     98                }
     99
     100                .site-branding {
     101                        min-height: 42px;
     102                }
     103
     104                @media screen and (min-width: 46.25em) {
     105                        .site-header {
     106                                padding-top: 21px;
     107                                padding-bottom: 21px;
     108                        }
     109                        .site-branding {
     110                                min-height: 56px;
     111                        }
     112                }
     113                @media screen and (min-width: 55em) {
     114                        .site-header {
     115                                padding-top: 25px;
     116                                padding-bottom: 25px;
     117                        }
     118                        .site-branding {
     119                                min-height: 62px;
     120                        }
     121                }
     122                @media screen and (min-width: 59.6875em) {
     123                        .site-header {
     124                                padding-top: 0;
     125                                padding-bottom: 0;
     126                        }
     127                        .site-branding {
     128                                min-height: 0;
     129                        }
     130                }
     131        <?php
     132                endif;
     133
     134                // Has a Custom Header been added?
    92135                if ( ! empty( $header_image ) ) :
    93136        ?>
  • trunk/src/wp-content/themes/twentyfifteen/style.css

    r30479 r30564  
    906906        border: 1px solid #eaeaea;
    907907        border: 1px solid rgba(51, 51, 51, 0.1);
    908         height: 48px;
     908        height: 42px;
    909909        overflow: hidden;
    910910        padding: 0;
    … …  
    916916        -ms-transform: translateY(-50%);
    917917        transform: translateY(-50%);
    918         width: 48px;
     918        width: 42px;
    919919}
    920920
    … …  
    922922        color: #333;
    923923        content: "\f419";
    924         line-height: 48px;
     924        line-height: 42px;
    925925        position: relative;
    926926        top: -1px;
Note: See TracChangeset for help on using the changeset viewer.