Skip to content

Commit 600a8ba

Browse files
committed
Admin Reskin: Fix mobile list table control heights.
On the mobile admin viewport, interactive elements on list table pages had inconsistent heights. Give them a consistent height. Follow-up to [61645]. Props andrewssanya, sainathpoojary, wildworks. See #64999. git-svn-id: https://develop.svn.wordpress.org/trunk@62400 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 1d51ae5 commit 600a8ba

10 files changed

Lines changed: 51 additions & 18 deletions

src/wp-admin/css/common.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,13 +1873,11 @@ p.auto-update-status {
18731873
border: 1px solid #c3c4c7;
18741874
border-top: none;
18751875
height: auto;
1876-
min-height: 32px; /* Compact size for header buttons */
18771876
margin-bottom: 0;
18781877
padding: 0 6px 0 16px;
18791878
background: #fff;
18801879
border-radius: 0 0 4px 4px;
18811880
color: #646970;
1882-
line-height: 2.30769231; /* 30px - matches compact button */
18831881
box-shadow: 0 0 0 transparent;
18841882
transition: box-shadow 0.1s linear;
18851883
}
@@ -4277,6 +4275,10 @@ img {
42774275
margin-bottom: 20px; /* Add margins beneath links for better spacing between boxes and elements */
42784276
}
42794277

4278+
#screen-meta-links .show-settings:after {
4279+
line-height: 1.9;
4280+
}
4281+
42804282
.wp-filter .search-form input[type="search"] {
42814283
font-size: 1rem;
42824284
}

src/wp-admin/css/forms.css

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,6 @@ input[type="number"].tiny-text {
522522
#doaction2,
523523
#post-query-submit {
524524
margin: 0 8px 0 0;
525-
min-height: 32px;
526-
line-height: 2.30769231; /* 30px for 32px height with 13px font */
527-
padding: 0 12px;
528525
}
529526

530527
/* @since 5.7.0 secondary bulk action controls require JS. */
@@ -1757,6 +1754,29 @@ table.form-table td .updated p {
17571754
display: block;
17581755
}
17591756

1757+
.wp-core-ui .tablenav input[type="text"],
1758+
.wp-core-ui .tablenav input[type="password"],
1759+
.wp-core-ui .tablenav input[type="date"],
1760+
.wp-core-ui .tablenav input[type="datetime"],
1761+
.wp-core-ui .tablenav input[type="datetime-local"],
1762+
.wp-core-ui .tablenav input[type="email"],
1763+
.wp-core-ui .tablenav input[type="month"],
1764+
.wp-core-ui .tablenav input[type="number"],
1765+
.wp-core-ui .tablenav input[type="search"],
1766+
.wp-core-ui .tablenav input[type="tel"],
1767+
.wp-core-ui .tablenav input[type="time"],
1768+
.wp-core-ui .tablenav input[type="url"],
1769+
.wp-core-ui .tablenav input[type="week"],
1770+
.wp-core-ui .tablenav select {
1771+
min-height: 40px;
1772+
}
1773+
1774+
.wp-core-ui .tablenav .button {
1775+
min-height: 40px;
1776+
line-height: 2.71428571;
1777+
padding: 0 14px;
1778+
}
1779+
17601780
p.search-box {
17611781
float: none;
17621782
width: 100%;
@@ -1775,6 +1795,11 @@ table.form-table td .updated p {
17751795
margin-bottom: 0;
17761796
}
17771797

1798+
p.search-box input[type="search"],
1799+
p.search-box input[type="text"] {
1800+
min-height: 40px;
1801+
}
1802+
17781803
p.search-box input[type="submit"] {
17791804
margin-bottom: 10px;
17801805
}

src/wp-admin/css/list-tables.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,15 +1941,16 @@ div.action-links,
19411941

19421942
.tablenav .tablenav-pages .button,
19431943
.tablenav .tablenav-pages .tablenav-pages-navspan {
1944-
min-width: 44px;
1945-
padding: 12px 8px;
1944+
min-width: 40px;
1945+
min-height: 40px;
1946+
padding: 10px 8px;
19461947
font-size: 18px;
19471948
line-height: 1;
19481949
}
19491950

19501951
.tablenav-pages .pagination-links .current-page {
1951-
min-width: 44px;
1952-
padding: 12px 6px;
1952+
min-width: 40px;
1953+
padding: 10px 6px;
19531954
font-size: 16px;
19541955
line-height: 1.125;
19551956
}
@@ -2177,6 +2178,11 @@ div.action-links,
21772178
box-sizing: border-box;
21782179
}
21792180

2181+
.inline-edit-row select,
2182+
.inline-edit-row input:where(:not([type=checkbox],[type=radio],[type=submit],[type=button])) {
2183+
min-height: 40px;
2184+
}
2185+
21802186
.inline-edit-row fieldset input[name=jj],
21812187
.inline-edit-row fieldset input[name=hh],
21822188
.inline-edit-row fieldset input[name=mn],

src/wp-admin/includes/class-wp-comments-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ protected function extra_tablenav( $which ) {
442442

443443
if ( ! empty( $output ) && $this->has_items() ) {
444444
echo $output;
445-
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
445+
submit_button( __( 'Filter' ), 'button-compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
446446
}
447447
}
448448

src/wp-admin/includes/class-wp-links-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function extra_tablenav( $which ) {
123123

124124
wp_dropdown_categories( $dropdown_options );
125125

126-
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
126+
submit_button( __( 'Filter' ), 'button-compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
127127
?>
128128
</div>
129129
<?php

src/wp-admin/includes/class-wp-list-table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public function search_box( $text, $input_id ) {
404404
<p class="search-box">
405405
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
406406
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
407-
<?php submit_button( $text, '', '', false, array( 'id' => 'search-submit' ) ); ?>
407+
<?php submit_button( $text, 'button-compact', '', false, array( 'id' => 'search-submit' ) ); ?>
408408
</p>
409409
<?php
410410
}
@@ -620,7 +620,7 @@ protected function bulk_actions( $which = '' ) {
620620

621621
echo "</select>\n";
622622

623-
submit_button( __( 'Apply' ), 'action', 'bulk_action', false, array( 'id' => "doaction$two" ) );
623+
submit_button( __( 'Apply' ), 'action button-compact', 'bulk_action', false, array( 'id' => "doaction$two" ) );
624624
echo "\n";
625625
}
626626

src/wp-admin/includes/class-wp-media-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ protected function extra_tablenav( $which ) {
242242
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
243243
do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
244244

245-
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
245+
submit_button( __( 'Filter' ), 'button-compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
246246

247247
if ( $this->is_trash && $this->has_items()
248248
&& current_user_can( 'edit_others_posts' )

src/wp-admin/includes/class-wp-posts-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ protected function extra_tablenav( $which ) {
596596

597597
if ( ! empty( $output ) ) {
598598
echo $output;
599-
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
599+
submit_button( __( 'Filter' ), 'button-compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
600600
}
601601
}
602602

src/wp-admin/includes/class-wp-screen.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,14 +969,14 @@ public function render_screen_meta() {
969969
<div id="screen-meta-links">
970970
<?php if ( $this->show_screen_options() ) : ?>
971971
<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
972-
<button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
972+
<button type="button" id="show-settings-link" class="button button-compact show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
973973
</div>
974974
<?php
975975
endif;
976976
if ( $this->get_help_tabs() ) :
977977
?>
978978
<div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
979-
<button type="button" id="contextual-help-link" class="button show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></button>
979+
<button type="button" id="contextual-help-link" class="button button-compact show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></button>
980980
</div>
981981
<?php endif; ?>
982982
</div>

src/wp-admin/includes/media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2905,7 +2905,7 @@ function media_upload_library_form( $errors ) {
29052905
</select>
29062906
<?php } ?>
29072907

2908-
<?php submit_button( __( 'Filter &#187;' ), '', 'post-query-submit', false ); ?>
2908+
<?php submit_button( __( 'Filter &#187;' ), 'button-compact', 'post-query-submit', false ); ?>
29092909

29102910
</div>
29112911

0 commit comments

Comments
 (0)