Skip to content

Commit 903187e

Browse files
committed
Plugins/Themes: Increase size of drop region for uploads.
The native drop area surface is the `input[type="file"]` element, which is quite small on plugin and theme upload screens. A larger drop area makes it easier for users to successfully drag their file over the region. Modify the CSS so that the file input occupies the full visual space. Props ibrahimriaz, ronya4927, huzaifaalmesbah, noruzzaman, r1k0, nikunj8866, joedolson. Fixes #64065. git-svn-id: https://develop.svn.wordpress.org/trunk@61598 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 8906a00 commit 903187e

1 file changed

Lines changed: 27 additions & 9 deletions

File tree

src/wp-admin/css/themes.css

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,9 +1086,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap {
10861086

10871087
.upload-theme .wp-upload-form,
10881088
.upload-plugin .wp-upload-form {
1089-
background: #f6f7f7;
1090-
border: 1px solid #c3c4c7;
1091-
padding: 30px;
1089+
position: relative;
10921090
margin: 30px auto;
10931091
display: inline-flex;
10941092
justify-content: space-between;
@@ -1097,7 +1095,16 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap {
10971095

10981096
.upload-theme .wp-upload-form input[type="file"],
10991097
.upload-plugin .wp-upload-form input[type="file"] {
1100-
margin-right: 10px;
1098+
background: #f6f7f7;
1099+
border: 1px solid #c3c4c7;
1100+
margin: 0;
1101+
padding: 30px 128px 30px 30px;
1102+
}
1103+
1104+
.upload-plugin .wp-upload-form input[type=submit],
1105+
.upload-theme .wp-upload-form input[type=submit] {
1106+
position: absolute;
1107+
right: 30px;
11011108
}
11021109

11031110
.upload-theme .install-help,
@@ -1131,6 +1138,7 @@ p.no-themes-local {
11311138
}
11321139

11331140
@media only screen and (max-width: 1120px) {
1141+
.upload-plugin .wp-upload-form,
11341142
.upload-theme .wp-upload-form {
11351143
margin: 20px 0;
11361144
max-width: 100%;
@@ -2015,12 +2023,22 @@ body.full-overlay-active {
20152023
padding-bottom: 4px;
20162024
}
20172025

2018-
.upload-theme .wp-upload-form,
2019-
.upload-plugin .wp-upload-form {
2020-
display: block;
2026+
.upload-plugin .wp-upload-form,
2027+
.upload-theme .wp-upload-form {
2028+
width: 100%;
20212029
}
20222030

2023-
:is(.upload-theme, .upload-plugin) .wp-upload-form input[type="submit"] {
2024-
margin-top: 10px;
2031+
.upload-plugin .wp-upload-form input[type=file],
2032+
.upload-theme .wp-upload-form input[type=file] {
2033+
padding: 30px 30px 80px;
2034+
width: 100%;
2035+
}
2036+
2037+
:is(.upload-theme, .upload-plugin) .wp-upload-form input[type="submit"].button {
2038+
right: unset;
2039+
left: 50%;
2040+
transform: translateX(-50%) !important;
2041+
top: calc( 1.4em + 42px ); /* Line height of control + gap + top padding. */
2042+
margin: 10px 0 0;
20252043
}
20262044
}

0 commit comments

Comments
 (0)