Make WordPress Core

Changeset 61598


Ignore:
Timestamp:
02/08/2026 01:10:32 AM (7 months ago)
Author:
joedolson
Message:

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.

File:
1 edited

Legend:

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

    r61480 r61598  
    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;
     
    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
     
    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;
     
    20162024        }
    20172025
    2018         .upload-theme .wp-upload-form,
    2019         .upload-plugin .wp-upload-form {
    2020                 display: block;
    2021         }
    2022 
    2023         :is(.upload-theme, .upload-plugin) .wp-upload-form input[type="submit"] {
    2024                 margin-top: 10px;
    2025         }
    2026 }
     2026        .upload-plugin .wp-upload-form,
     2027        .upload-theme .wp-upload-form {
     2028                width: 100%;
     2029        }
     2030
     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;
     2043        }
     2044}
Note: See TracChangeset for help on using the changeset viewer.