Admin: Standardize mobile viewport heights for interactive elements#11750
Admin: Standardize mobile viewport heights for interactive elements#11750himanshupathak95 wants to merge 14 commits into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
dca69f9 to
220cc0c
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
220cc0c to
3f78edc
Compare
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR! It looks good for the most part, but there are a few points that need further adjustment.
Media Library (List view): We should be able to use the button-compact class on these two buttons without writing any CSS.
Install Themes: These buttons should be 32px in size.
Install Plugins: These buttons should be 32px in size.
2545903 to
c4e83fc
Compare
|
Thanks @t-hamano for the suggestions and catching the leftovers. I've tried to use classes and avoid hardcoding as much as possible.
|
|
Thanks @t-hamano for the reply.
I intentionally made them 32px in size since you asked the same in #11750 (review), specifically -
I also feel like they should have |
Apologies, there was an error in my explanation. What I meant to say is that all buttons should always be 40px on mobile. This means that a button with a 32px size in the desktop layout should change to a 40px size in the mobile layout. To achieve this, I wanted to suggest that the "button-compact" CSS class would be appropriate. |
c4e83fc to
139d9c4
Compare
| min-height: 32px; | ||
| line-height: 2.30769231; /* 30px for 32px min-height */ | ||
| padding: 0 12px; |
There was a problem hiding this comment.
This change is not intended. On the desktop layout, the button size changes from 32px to 40px. Along with the removal of these styles, each button needs the button-compact class. This will ensure that the button height is 32px on the desktop layout and 40px on the mobile layout.
The file to be edited is likely theme-install.php.






Trac ticket: https://core.trac.wordpress.org/ticket/64999
This PR fixes inconsistent interactive element heights to 40px in the admin mobile viewport (≤782px) on:
Follow-up to [62294].
Tested in Chrome at 782px viewport width (mobile emulation). Before/after
screenshots attached.