WordPress.org

Make WordPress Core

Changeset 33454


Ignore:
Timestamp:
07/28/2015 03:42:36 AM (6 years ago)
Author:
westonruter
Message:

Customizer: Hide empty space in footer on small screens since it is only populated on larger screens.

Props obenland.
Fixes #33138.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-controls.js

    r33445 r33454  
    596596                    container.scrollTop( 0 );
    597597                    expand = function () {
     598                        var matchMedia, offset;
     599                        matchMedia = window.matchMedia || window.msMatchMedia;
     600                        offset = 90; // 45px for customize header actions + 45px for footer actions.
     601
     602                        // No footer on small screens.
     603                        if ( matchMedia && matchMedia( '(max-width: 640px)' ).matches ) {
     604                            offset = 45;
     605                        }
     606
    598607                        section.container.addClass( 'open' );
    599608                        overlay.addClass( 'section-open' );
     
    601610                        scroll = container.scrollTop();
    602611                        content.css( 'margin-top', ( 45 - position - scroll ) );
    603                         content.css( 'height', ( window.innerHeight - 90 ) );
     612                        content.css( 'height', ( window.innerHeight - offset ) );
    604613                        sectionTitle.attr( 'tabindex', '-1' );
    605614                        backBtn.attr( 'tabindex', '0' );
Note: See TracChangeset for help on using the changeset viewer.