Opened 6 weeks ago
Closed 3 weeks ago
#64796 closed defect (bug) (fixed)
Buttons output in `extra_tablenav` are too tall
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Administration | Keywords: | has-patch admin-reskin commit dev-reviewed |
| Focuses: | css | Cc: |
Description
The new button and form field styles were introduced in [61645] for #64547.
When a plugin outputs a button in the extra_tablenav method of a custom list table, the button is now too tall. It looks like they need to get the same line-height rule that is applied to .tablenav .actions .button: https://github.com/WordPress/wordpress-develop/blob/707fa78322968b590e84b29d0575de65dc785b2c/src/wp-admin/css/forms.css#L549-L553
Attachments (2)
Change History (21)
#1
@
6 weeks ago
I've just noticed from the screenshot that the button doesn't have a background colour either. Is that intentional?
#2
in reply to:
↑ description
@
6 weeks ago
Replying to johnbillion:
The new button and form field styles were introduced in [61645] for #64547.
When a plugin outputs a button in the
extra_tablenavmethod of a custom list table, the button is now too tall. It looks like they need to get the sameline-heightrule that is applied to.tablenav .actions .button: https://github.com/WordPress/wordpress-develop/blob/707fa78322968b590e84b29d0575de65dc785b2c/src/wp-admin/css/forms.css#L549-L553
Hi @johnbillion, I do not think that only line-height css will fix the issue, because the newer button styles have a min-height of 40px, which is the main cause that it looks tall.
While the buttons that are inside tablenav and actions, it have a min-height set to 32px.
Either we need to increase the min-height for tablenav from 32px to 40px or set whatever button inside tablenav set min-height to 32px?
#4
follow-up:
↓ 5
@
5 weeks ago
In [61645] it use specific selector so for tablenav buttons.
.tablenav .actions .button {
min-height: 32px;
line-height: 2.30769231; /* 30px for 32px height with 13px font */
padding: 0 12px;
}
IMO we should use .wp-core-ui .tablenav .button selector that will fix the issue.
#5
in reply to:
↑ 4
@
5 weeks ago
Replying to mukesh27:
In [61645] it use specific selector so for tablenav buttons.
.tablenav .actions .button { min-height: 32px; line-height: 2.30769231; /* 30px for 32px height with 13px font */ padding: 0 12px; }IMO we should use
.wp-core-ui .tablenav .buttonselector that will fix the issue.
Yes thanks @mukesh27, Since this style effectively adds to all the button that are inside the actions class.
The change to .wp-core-ui .tablenav .button fixes the issue, checked locally because it targets all the buttons that are inside .tablenav.
I will raise a PR to update the same.
This ticket was mentioned in PR #11224 on WordPress/wordpress-develop by @hbhalodia.
5 weeks ago
#6
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/64796
Before (button does not placed inside .actions) | After (button does not placed inside .actions)
|
|---|---|
| | |
## Use of AI Tools
- None
@nilambar commented on PR #11224:
5 weeks ago
#8
#9
@
4 weeks ago
Tested the patch from PR #11224 in a local environment.
Setup:
- WordPress trunk (7.0-beta / latest develop)
- Multisite enabled
- No additional plugins active (clean install)
- Browser: Chrome (Version 145.0.7632.162 (Official Build) (arm64))
Steps to reproduce:
- Used the provided
dummy-list-table.phpattachment from the ticket. - Added it as a plugin and activated it.
- Accessed the page via Tools → Dummy List Table.
- Observed the button output from
extra_tablenav()(without.actionswrapper).
Results before patch: https://ibb.co/HDDd7g3M
- The "Export" button rendered in the top
.tablenavappears slightly misaligned compared to standard admin buttons.
Patch testing: https://ibb.co/JjgWwV7g
- Applied the patch manually to
src/wp-admin/css/forms.css. - Rebuilt assets using
npm run build. - Performed a hard refresh to ensure updated CSS is loaded.
Results after patch: https://ibb.co/7xdy8Z3k
- The button inside
.tablenav(even without.actionswrapper) is styled consistently. - Height, line-height, and alignment match other core buttons.
- Verified in both top and bottom
.tablenav.
Additional checks:
- Tested buttons inside
.actionswrapper (control case) — no regression observed. - Checked other admin screens (Posts list table, Users screen) — no visual regressions observed.
Conclusion:
The patch resolves the inconsistency by ensuring buttons within .tablenav receive consistent styling regardless of markup structure.
@shailu25 commented on PR #11224:
4 weeks ago
#10
This ticket was mentioned in Slack in #core-test by ozgur_sar. View the logs.
3 weeks ago
#12
@
3 weeks ago
Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11224
Environment
- WordPress: 7.0-beta6-62085-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.8 / Client: mysqlnd 8.2.29)
- Browser: Chrome 146.0.0.0
- OS: Linux
- Theme: Twenty Twenty-Five 1.4
- MU Plugins:
- Dummy List Table
- Plugins:
- Test Reports 1.2.1
Steps taken
- Ensure you have the Dummy list table plugin is installed and activated.
- Head over to Tools > Dummy List Table.
- Observe the size of the button.
- ✅ Patch is solving the problem.
Expected result
- The button should have a consistent size and not overlap the table below it.
Additional Notes
- None
Screenshots/Screencast with results
@hbhalodia commented on PR #11224:
3 weeks ago
#14
This fixes the specific named issue, but the same issue exists for other input types inserted in extra_tablenav, as well. E.g, adding a
selector aninputwill also have the extra height.
I think the same logic should be used to ensure that other controls used by core in that context get the compact sizing. The select styling right above can be split between sizing characteristics & positioning characteristics.
I'm not sure that core uses an input in extra_tablenav anywhere, and it's more reasonable that extenders would need to style things not used by core, so it may not be necessary to add that.
Hi @joedolson, Thanks for the suggestion. I have updated to add all the input controls that can be used, but as rightly said, core does not uses all of them and its responsibility of extenders to fix the style if breaks at there end.
For now, I have update the PR to use it for all controls.
Thanks,


Screenshot