WordPress.org

Make WordPress Core

Changeset 37912


Ignore:
Timestamp:
06/29/2016 01:30:00 PM (4 years ago)
Author:
afercia
Message:

List tables: Make the pagination links and text better responsive.

On small screens, especially with longer translations, the pagination links and
text could break in two lines. This fixes it moving down the text in a new line.

Fixes #33962.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

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

    r37740 r37912  
    21532153    }
    21542154}
     2155
     2156@media screen and ( max-width: 480px ) {
     2157    .tablenav-pages .current-page {
     2158        margin: 0;
     2159    }
     2160
     2161    .tablenav-pages .tablenav-paging-text {
     2162        float: left;
     2163        width: 100%;
     2164        padding-top: 0.5em;
     2165    }
     2166}
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r37663 r37912  
    773773
    774774        $total_pages_before = '<span class="paging-input">';
    775         $total_pages_after  = '</span>';
     775        $total_pages_after  = '</span></span>';
    776776
    777777        $disable_first = $disable_last = $disable_prev = $disable_next = false;
     
    814814        if ( 'bottom' === $which ) {
    815815            $html_current_page  = $current;
    816             $total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input">';
     816            $total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input"><span class="tablenav-paging-text">';
    817817        } else {
    818             $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' />",
     818            $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' /><span class='tablenav-paging-text'>",
    819819                '<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>',
    820820                $current,
Note: See TracChangeset for help on using the changeset viewer.