Admin: Standardize mobile viewport heights for interactive elements on list table pages#11461
Admin: Standardize mobile viewport heights for interactive elements on list table pages#11461SainathPoojary wants to merge 5 commits intoWordPress:trunkfrom
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. |
|
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. |
| #screen-meta-links .show-settings { | ||
| box-sizing: border-box; | ||
| min-height: 40px; | ||
| line-height: 2.71428571; | ||
| } | ||
|
|
||
| #screen-meta-links .show-settings:after { | ||
| font: normal 20px/1.9 dashicons; | ||
| } | ||
|
|
There was a problem hiding this comment.
| #screen-meta-links .show-settings { | |
| box-sizing: border-box; | |
| min-height: 40px; | |
| line-height: 2.71428571; | |
| } | |
| #screen-meta-links .show-settings:after { | |
| font: normal 20px/1.9 dashicons; | |
| } |
I think we should use the button-compact class instead of hardcoding override styles in the mobile layout. This button is 32px in size and will automatically scale to 40px in the mobile layout.
Therefore, simply adding button-compact to the following locations should resolve the issue.
| p.search-box .button { | ||
| min-height: 40px; | ||
| line-height: 2.71428571; /* 38px - matches default mobile button */ | ||
| padding: 0 14px; | ||
| } |
| #doaction, | ||
| #doaction2, | ||
| #post-query-submit { | ||
| min-height: 40px; | ||
| line-height: 2.71428571; | ||
| padding: 0 14px; | ||
| } |
There was a problem hiding this comment.
To avoid such overwrites, I believe we should remove min-height, line-height, and padding from these buttons in the first place:
wordpress-develop/src/wp-admin/css/forms.css
Lines 521 to 528 in 8a99228
Instead, we should be able to use button-compact class.
| .wp-core-ui .tablenav select { | ||
| line-height: 2.375; | ||
| font-size: 16px; | ||
| } |
There was a problem hiding this comment.
Are these styles really necessary?

Fixes inconsistent heights on interactive elements in the admin mobile viewport (≤782px) on list table pages (Posts, Pages, etc.).
2026-04-08.13-45-37.mp4
Trac ticket: #64999