WordPress.org

Make WordPress Core

Changeset 39214


Ignore:
Timestamp:
11/13/2016 06:59:21 PM (19 months ago)
Author:
westonruter
Message:

Customize: Prevent the "Hide Controls" button label from overrunning the device preview buttons.

Adds translation context for "Hide Controls" strings so translators can supply shorter strings where space is constrained. Adds styles to fade-out long the "Hide Controls" label where it would run into the device preview buttons.

Props westonruter, ocean90.
Fixes #38762.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/themes.css

    r39140 r39214  
    15221522    -webkit-border-radius: 0 !important;
    15231523    border-radius: 0 !important;
     1524    z-index: -1; /* Below device buttons */
    15241525}
    15251526
     
    16251626.wp-full-overlay-footer .devices {
    16261627    float: right;
     1628    background: #eee;
     1629    -webkit-box-shadow: -20px 0 10px -5px #eee;
     1630    box-shadow: -20px 0 10px -5px #eee;
    16271631}
    16281632
  • trunk/src/wp-admin/customize.php

    r39140 r39214  
    192192            </div>
    193193            <?php endif; ?>
    194             <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php esc_attr_e( 'Hide Controls' ); ?>">
     194            <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php echo esc_attr( _x( 'Hide Controls', 'label for hide controls button without length constraints' ) ); ?>">
    195195                <span class="collapse-sidebar-arrow"></span>
    196                 <span class="collapse-sidebar-label"><?php _e( 'Hide Controls' ); ?></span>
     196                <span class="collapse-sidebar-label"><?php _ex( 'Hide Controls', 'short (~12 characters) label for hide controls button' ); ?></span>
    197197            </button>
    198198        </div>
  • trunk/src/wp-includes/script-loader.php

    r39197 r39214  
    468468        'previewIframeTitle' => __( 'Site Preview' ),
    469469        'loginIframeTitle'   => __( 'Session expired' ),
    470         'collapseSidebar'    => __( 'Hide Controls' ),
    471         'expandSidebar'      => __( 'Show Controls' ),
     470        'collapseSidebar'    => _x( 'Hide Controls', 'label for hide controls button without length constraints' ),
     471        'expandSidebar'      => _x( 'Show Controls', 'label for hide controls button without length constraints' ),
    472472        'untitledBlogName'   => __( '(Untitled)' ),
    473473        // Used for overriding the file types allowed in plupload.
Note: See TracChangeset for help on using the changeset viewer.