List Tables: Update spacing in action items on small screens.

Switch the display to flex. The action items use their intrinsic space, rather than a fixed grid, which prevents too much space between items on larger mobile screens.

Props arunsathiya, sabernhardt, danfarrow, notlaura, aliveic, y_kolev
Fixes #48546, #47895.


Built from https://develop.svn.wordpress.org/trunk@51073


git-svn-id: http://core.svn.wordpress.org/trunk@50682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryelle 2021-06-04 18:14:56 +00:00
parent eaea2f3b45
commit 13d9212bf4
5 changed files with 35 additions and 29 deletions

View File

@ -1872,21 +1872,24 @@ div.action-links,
padding-top: 10px;
}
/* Make row actions more easy to select on mobile */
body:not(.plugins-php) .row-actions {
display: grid;
grid-template-columns: auto auto auto;
color: transparent;
.row-actions {
margin-right: -8px;
margin-left: -8px;
padding-top: 4px;
}
.row-actions span {
padding: 4px 0;
/* Make row actions more easy to select on mobile */
body:not(.plugins-php) .row-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
color: transparent;
}
.row-actions span a,
.row-actions span .button-link {
display: inline-block;
padding: 4px 0;
padding: 4px 8px;
line-height: 1.5;
}
@ -2136,6 +2139,11 @@ div.action-links,
margin-left: 0;
width: 100%;
}
table.media .column-title .has-media-icon ~ .row-actions {
margin-right: 0;
clear: both;
}
}
@media screen and (max-width: 480px) {
@ -2143,11 +2151,6 @@ div.action-links,
margin: 0;
}
/* Drop row actions to two columns on a small screen */
.row-actions:not(.plugins-php) {
grid-template-columns: auto auto;
}
.tablenav.bottom .displaying-num {
position: relative;
top: 0;

File diff suppressed because one or more lines are too long

View File

@ -1871,21 +1871,24 @@ div.action-links,
padding-top: 10px;
}
/* Make row actions more easy to select on mobile */
body:not(.plugins-php) .row-actions {
display: grid;
grid-template-columns: auto auto auto;
color: transparent;
.row-actions {
margin-left: -8px;
margin-right: -8px;
padding-top: 4px;
}
.row-actions span {
padding: 4px 0;
/* Make row actions more easy to select on mobile */
body:not(.plugins-php) .row-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
color: transparent;
}
.row-actions span a,
.row-actions span .button-link {
display: inline-block;
padding: 4px 0;
padding: 4px 8px;
line-height: 1.5;
}
@ -2135,6 +2138,11 @@ div.action-links,
margin-right: 0;
width: 100%;
}
table.media .column-title .has-media-icon ~ .row-actions {
margin-left: 0;
clear: both;
}
}
@media screen and (max-width: 480px) {
@ -2142,11 +2150,6 @@ div.action-links,
margin: 0;
}
/* Drop row actions to two columns on a small screen */
.row-actions:not(.plugins-php) {
grid-template-columns: auto auto;
}
.tablenav.bottom .displaying-num {
position: relative;
top: 0;

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-51072';
$wp_version = '5.8-alpha-51073';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.