Make WordPress Core

Ticket #29949: 29949.2.diff

File 29949.2.diff, 5.8 KB (added by celloexpressions, 11 years ago)

refresh

  • src/wp-admin/css/customize-controls.css

     
    208208        transition: color .1s ease-in-out, background .1s ease-in-out;
    209209}
    210210
    211 .control-panel-back {
     211.control-panel-back,
     212.expand-controls {
    212213        display: block;
    213214        position: fixed;
    214215        top: 0;
     
    224225        transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out;
    225226}
    226227
    227 .collapsed .control-panel-back {
     228.expand-controls {
     229        padding-right: 0;
     230        transition: none;
     231}
     232
     233.collapsed .control-panel-back,
     234.collapsed .customize-controls-close {
    228235        display: none;
    229236}
    230237
     238.collapsed .expand-controls {
     239        left: 0;
     240}
     241
    231242.customize-controls-close:focus,
    232243.customize-controls-close:hover,
    233244.control-panel-back:focus,
    234 .control-panel-back:hover {
     245.control-panel-back:hover,
     246.expand-controls:focus,
     247.expand-controls:hover {
    235248        background: #ddd;
    236249        border-color: #ccc;
    237250        color: #000;
     
    256269        left: 13px;
    257270}
    258271
     272.expand-controls:before {
     273        font: normal 20px/1 dashicons;
     274        content: "\f345";
     275        position: relative;
     276        top: 7px;
     277        left: 13px;
     278}
     279
     280.rtl .expand-controls:before {
     281        content: "\f341";
     282}
     283
    259284.rtl .control-panel-back:before {
    260285        content: "\f344";
    261286}
     
    431456        box-shadow: none !important;
    432457        -webkit-border-radius: 0 !important;
    433458        border-radius: 0 !important;
     459        position: fixed;
     460        left: 0;
     461        bottom: 0;
    434462}
    435463
    436 
    437464.collapse-sidebar:active,
    438465.collapse-sidebar:active .collapse-sidebar-label,
    439466.collapse-sidebar:active .collapse-sidebar-arrow:before {
     
    440467        text-shadow: none;
    441468}
    442469
    443 .collapsed .collapse-sidebar-arrow:before {
    444         color: #888;
     470/* Collapsed Mode */
     471@media screen and (min-width:600px) {
     472        .collapsed #customize-preview {
     473                left: 46px;
     474        }
     475
     476        .wp-full-overlay.collapsed #customize-controls {
     477                margin-left: 0;
     478                width: 46px;
     479                white-space: nowrap;
     480        }
     481
     482        .collapsed .wp-full-overlay-main {
     483                right: 0;
     484                width: auto;
     485        }
     486
     487        .collapsed #customize-info,
     488        .collapsed #customize-controls .accordion-section-title:after {
     489                display: none;
     490        }
     491
     492        .collapsed .control-section .accordion-section-title,
     493        .collapsed .control-panel .accordion-section-title {
     494                white-space: nowrap;
     495                overflow: hidden;
     496                text-overflow: ellipsis;
     497        }
     498
     499        .collapsed #customize-controls .wp-full-overlay-sidebar-content {
     500                overflow-y: hidden;
     501        }
     502
     503        /* No animation fading in, as it causes layout issues */
     504        .expanded.wp-full-overlay,
     505        .expanded #customize-preview,
     506        .expanded #customize-controls {
     507                transition: none;
     508        }
     509
     510        .in-sub-panel.wp-full-overlay,
     511        .collapsed.wp-full-overlay,
     512        .in-sub-panel #customize-preview,
     513        .collapsed #customize-preview,
     514        .collapsed #customize-controls {
     515                transition: all .2s linear;
     516        }
     517
    445518}
    446519
     520
    447521/* Style for custom settings */
    448522
    449523/*
  • src/wp-admin/css/themes.css

     
    14641464
    14651465/* Collapse Button */
    14661466.wp-full-overlay a.collapse-sidebar {
    1467         position: absolute;
     1467        position: fixed;
    14681468        bottom: 12px;
    14691469        left: 0;
    14701470        z-index: 50;
     
    14831483        color: #0074a2;
    14841484}
    14851485
    1486 .wp-full-overlay.collapsed .collapse-sidebar {
    1487         position: absolute;
    1488         left: 100%;
    1489 }
    1490 
    14911486.wp-full-overlay .collapse-sidebar-arrow {
    14921487        position: static;
    14931488        margin-top: 0;
  • src/wp-admin/customize.php

     
    122122                                <span class="screen-reader-text"><?php _e( 'Cancel' ); ?></span>
    123123                        </a>
    124124                        <span class="control-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span>
     125                        <span class="expand-controls" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Expand controls' ); ?></span></span>
    125126                </div>
    126127
    127128                <?php
     
    173174                <div id="customize-footer-actions" class="wp-full-overlay-footer">
    174175                        <a href="#" class="collapse-sidebar button-secondary" title="<?php esc_attr_e('Collapse Sidebar'); ?>">
    175176                                <span class="collapse-sidebar-arrow"></span>
    176                                 <span class="collapse-sidebar-label"><?php _e('Collapse'); ?></span>
     177                                <span class="collapse-sidebar-label"><?php _e( 'Collapse controls' ); ?></span>
    177178                        </a>
    178179                </div>
    179180        </form>
  • src/wp-admin/js/customize-controls.js

     
    11851185                                this.click();
    11861186                });
    11871187
     1188                $('.expand-controls').on( 'click keydown', function( event ) {
     1189                        overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
     1190                });
     1191
    11881192                $('.collapse-sidebar').on( 'click keydown', function( event ) {
    1189                         if ( event.type === 'keydown' &&  13 !== event.which ) // enter
     1193                        if ( event.type === 'keydown' &&  13 !== event.which ) { // enter
    11901194                                return;
     1195                        }
    11911196
    11921197                        overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
     1198                        $('.control-section.open .accordion-section-title').trigger( 'click' );
     1199                        if ( overlay.hasClass('in-sub-panel') ) {
     1200                                $('.control-panel-back').trigger( 'click' );
     1201                        }
    11931202                        event.preventDefault();
    11941203                });
    11951204
     1205                $('.accordion-section-title').on( 'click keydown', function( event ) {
     1206                        if ( event.type === 'keydown' &&  13 !== event.which ) { // enter
     1207                                return;
     1208                        } else if ( overlay.hasClass( 'collapsed' ) ) {
     1209                                if ( ! $( this ).closest( '.control-section' ).hasClass( 'open' ) ) {
     1210                                        $( '.expand-controls' ).trigger( 'click' );                             
     1211                                }
     1212                        }
     1213                });
     1214
    11961215                // Bind site title display to the corresponding field.
    11971216                if ( title.length ) {
    11981217                        $( '#customize-control-blogname input' ).on( 'input', function() {