Make WordPress Core

Ticket #28655: 28655.diff

File 28655.diff, 3.5 KB (added by celloexpressions, 11 years ago)

Based on .control-panel-back, use .screen-reader-text, change JS variable to reduce potential confusion.

  • src/wp-admin/css/colors/_admin.scss

     
    472472        color: $menu-highlight-text;
    473473}
    474474
     475.customize-controls-close:focus,
     476.customize-controls-close:hover,
    475477.control-panel-back:focus,
    476478.control-panel-back:hover {
    477479        background-color: $menu-highlight-background;
  • src/wp-admin/css/customize-controls.css

     
    170170        width: 100%;
    171171}
    172172
     173
     174.customize-controls-close {
     175        display: block;
     176        position: absolute;
     177        top: 0;
     178        left: 0;
     179        width: 45px;
     180        height: 45px;
     181        padding-right: 2px;
     182        background: #eee;
     183        border-right: 1px solid #ddd;
     184        color: #444;
     185        cursor: pointer;
     186        -webkit-transition: color ease-in .1s;
     187        transition: color ease-in .1s;
     188}
     189
    173190.control-panel-back {
    174191        display: block;
    175192        position: fixed;
     
    190207        display: none;
    191208}
    192209
     210.customize-controls-close:focus,
     211.customize-controls-close:hover,
    193212.control-panel-back:focus,
    194213.control-panel-back:hover {
    195214        background-color: #0074a2;
     
    197216        outline: none;
    198217}
    199218
     219.customize-controls-close:before {
     220        font: normal 32px/1 dashicons;
     221        content: "\f335";
     222        position: relative;
     223        top: 8px;
     224        left: 7px;
     225}
     226
    200227.control-panel-back:before {
    201228        font: normal 29px/1 dashicons;
    202229        content: "\f340";
     
    217244        height: 22px;
    218245}
    219246
    220 #customize-header-actions a.back {
    221         position: relative;
    222         left: 0;
    223         -webkit-transition: left ease-in-out .18s;
    224         transition: left ease-in-out .18s;
    225 }
    226 
    227 .in-sub-panel #customize-header-actions a.back {
    228         left: -120px;
    229 }
    230 
    231247.wp-full-overlay-sidebar .wp-full-overlay-header {
    232248        -webkit-transition: padding ease-in-out .18s;
    233249        transition: padding ease-in-out .18s;
  • src/wp-admin/customize.php

     
    108108                                submit_button( $save_text, 'primary save', 'save', false );
    109109                        ?>
    110110                        <span class="spinner"></span>
    111                         <a class="back button" href="<?php echo esc_url( $return ? $return : admin_url( 'themes.php' ) ); ?>">
    112                                 <?php _e( 'Cancel' ); ?>
     111                        <a class="customize-controls-close" href="<?php echo esc_url( $return ? $return : admin_url( 'themes.php' ) ); ?>">
     112                                <span class="screen-reader-text"><?php _e( 'Cancel' ); ?></span>
    113113                        </a>
    114114                </div>
    115115
  • src/wp-admin/js/customize-controls.js

     
    10411041
    10421042                        state.bind( 'change', function() {
    10431043                                var save = $('#save'),
    1044                                         back = $('.back');
     1044                                        close = $('.customize-controls-close .screen-reader-text');
    10451045
    10461046                                if ( ! activated() ) {
    10471047                                        save.val( api.l10n.activate ).prop( 'disabled', false );
    1048                                         back.text( api.l10n.cancel );
     1048                                        close.text( api.l10n.cancel );
    10491049
    10501050                                } else if ( saved() ) {
    10511051                                        save.val( api.l10n.saved ).prop( 'disabled', true );
    1052                                         back.text( api.l10n.close );
     1052                                        close.text( api.l10n.close );
    10531053
    10541054                                } else {
    10551055                                        save.val( api.l10n.save ).prop( 'disabled', false );
    1056                                         back.text( api.l10n.cancel );
     1056                                        close.text( api.l10n.cancel );
    10571057                                }
    10581058                        });
    10591059