Opened 4 weeks ago
Last modified 3 days ago
#63337 new enhancement
Enhance Widget Spacing for Mobile Dashboard
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Administration | Keywords: | needs-design-feedback has-patch |
Focuses: | ui, css | Cc: |
Description
In the WordPress admin dashboard, widgets are grouped into .postbox-container columns, each containing individual .postbox widgets. Each container has a default margin-bottom: 20px, and each widget also has margin-bottom: 20px, which creates a cumulative 40px gap between containers when they stack vertically.
This layout works well on wider screens, where containers are visually distinct columns. However, on mobile or narrower screens where containers stack, this spacing results in significant vertical gaps, which may not be necessary in that context.
Enchancement:
It may be helpful to align the vertical spacing more closely with the single-column layout by slightly reducing or normalizing the margin-bottom on .postbox-container elements in smaller viewports.
A reduction in container spacing on smaller screens could:
- Improve perceived consistency and flow between widgets
- Reduce unnecessary whitespace
- Create a more compact and mobile-friendly dashboard layout
Screenshot
Attachments (1)
Change History (7)
#1
@
4 weeks ago
- Keywords needs-design-feedback added
Hey @sainathpoojary, Thanks for the ticket.
I observed the same behaviour as you reported, but I do not know if this was intentional or not. Although it does make sense to minimize the gaps in the mobile view, since we can't really drag and drop in the mobile view, and widgets appear as a list.
This ticket was mentioned in PR #8741 on WordPress/wordpress-develop by @sainathpoojary.
4 weeks ago
#3
- Keywords has-patch added
PR reduces vertical spacing between stacked dashboard widgets on smaller screens by setting margin-bottom: 0 on .meta-box-sortables, resulting in a more compact and consistent mobile layout.
Trac ticket: #63337
#4
@
3 weeks ago
Hi @sainathpoojary
Thanks for the ticket and the patch.
I tested the changes and agree this improves the dashboard layout on smaller screens. Reducing the vertical gaps between stacked .postbox-container elements makes the mobile experience feel much cleaner and more cohesive. This is a nice enhancement for better usability.
Great job spotting and addressing this.
If this is considered worth improving, I’ve included a patch