Plugin Installer: Allow 4 columns of search results on wide screens.

For screens wider than 2300px, show 4 colums of search results, as 3 columns looked quite stretched out.

This change also increases the default number of search results from 30 to 36, so that the columns have an even number of results, regardless of whether there are 2, 3, or 4 of them.

Props nielslange.
Fixes #43573.



git-svn-id: https://develop.svn.wordpress.org/trunk@43669 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2018-10-02 20:06:37 +00:00
parent 9bdb0eb1d5
commit 1f4ed43c65
2 changed files with 26 additions and 1 deletions

View File

@ -1398,6 +1398,31 @@ ul.cat-checklist {
}
}
@media screen and ( min-width: 2300px ) {
.plugin-card {
width: 25%;
width: calc( 25% - 12px );
}
.plugin-card:nth-child(odd) {
clear: none;
margin-left: 8px;
}
.plugin-card:nth-child(even) {
margin-right: 8px;
}
.plugin-card:nth-child(4n+1) {
clear: both;
margin-left: 0;
}
.plugin-card:nth-child(4n) {
margin-right: 0;
}
}
.plugin-card-top {
position: relative;
padding: 20px 20px 10px;

View File

@ -93,7 +93,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
$paged = $this->get_pagenum();
$per_page = 30;
$per_page = 36;
// These are the tabs which are shown on the page
$tabs = array();