Skip to content

Commit 2158edc

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@39214 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0c044ba commit 2158edc

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/wp-admin/css/themes.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,7 @@ body.full-overlay-active {
15211521
box-shadow: none !important;
15221522
-webkit-border-radius: 0 !important;
15231523
border-radius: 0 !important;
1524+
z-index: -1; /* Below device buttons */
15241525
}
15251526

15261527
.wp-core-ui .wp-full-overlay .collapse-sidebar:hover,
@@ -1624,6 +1625,9 @@ body.full-overlay-active {
16241625

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

16291633
.wp-full-overlay-footer .devices button {

src/wp-admin/customize.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@
191191
<?php endforeach; ?>
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>
199199
</form>

src/wp-includes/script-loader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,8 @@ function wp_default_scripts( &$scripts ) {
467467
'notAllowed' => __( 'Sorry, you are not allowed to customize this site.' ),
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.
474474
'allowedFiles' => __( 'Allowed Files' ),

0 commit comments

Comments
 (0)