Make WordPress Core

#61689 closed defect (bug) (fixed)

Admin menu: submenu link groups have less top padding than bottom padding

Reported by: trushaamin's profile trushaamin Owned by: audrasjb's profile audrasjb
Milestone: 6.8 Priority: normal
Severity: minor Version: 3.8
Component: Administration Keywords: has-patch has-screenshots commit
Focuses: ui, css Cc:

Description

I have just found an issue in the WordPress dashboard sidebar: the padding above and below 'Home' and 'Update' is not equal.

Attachments (4)

Dashboad Padding.png (779.5 KB) - added by trushaamin 18 months ago.
61689.diff (840 bytes) - added by modi2918 18 months ago.
Patch file for solution
Dashboad padding responsive.png (208.7 KB) - added by trushaamin 18 months ago.
SCR-20250125-lpkk.png (463.6 KB) - added by karmatosed 12 months ago.

Download all attachments as: .zip

Change History (21)

@modi2918
18 months ago

Patch file for solution

#1 @hellofromTonya
16 months ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 6.7
  • Version changed from 6.6 to 3.8

Hello @trushaamin,

Welcome back to WordPress Core's Trac. Thank you for reporting the issue.

#25858 via [26072] added that CSS declaration. Updating the Version to 3.8.

This ticket appears actionable. Moving it into 6.7 for fix consideration.

#2 @peterwilsoncc
16 months ago

  • Milestone changed from 6.7 to 6.8

Without design feedback, I am moving this to the next release.

While the padding may not be equivalent mathematically, I'm reluctant to make the change without feedback as it may be aesthetically equivalent.

#3 @priyank9033
15 months ago

  • Focuses accessibility added

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


15 months ago

#5 @priyank9033
15 months ago

  • Focuses accessibility removed

#6 @sabernhardt
15 months ago

  • Component changed from Menus to Administration
  • Severity changed from normal to minor
  • Summary changed from On responsive device the padding above and below the Dashboad sidebar are not the same to Admin menu: submenu link groups have less top padding than bottom padding

it may be aesthetically equivalent

FWIW, I like that the current submenu links are slightly closer to their own top-level link than to the next group. The descender on the letter p and the circle for the update count can make the Updates link look lower, too, even with the extra pixel on the bottom.

Historically, though, the submenu's 7px value seems to have been chosen for a mathematical equivalent.

  • 724106 added the padding with a 1px top margin.
  • Then 761665 and 762292 removed the top margin before the MP6 plugin's version 2.0.

If the top padding is worth changing to 8 pixels, 7px 0 8px; would be replaced with the shorthand 8px 0; (in both places: line 130 and line 582).

This ticket was mentioned in PR #7803 on WordPress/wordpress-develop by @im3dabasia1.


14 months ago
#7

Trac ticket: https://core.trac.wordpress.org/ticket/61689

This PR fixes #61689 by adjusting the padding for submenu link groups in the admin menu, ensuring consistent top and bottom padding.

#8 @im3dabasia1
14 months ago

  • Keywords has-screenshots added

Hi,

I’ve raised a PR (https://github.com/WordPress/wordpress-develop/pull/7803) for this issue. With my patch, the padding is now consistent on both top and bottom for both small and large screen layouts.

For large screens: https://postimg.cc/rDd5rx4m

For small screens: https://postimg.cc/zLKWdN0Y

Thank you, please let me know if you have any further feedback

Last edited 14 months ago by im3dabasia1 (previous) (diff)

#9 @trushaamin
13 months ago

  • Keywords needs-design-feedback has-screenshots removed

#10 @audrasjb
12 months ago

  • Keywords needs-design-feedback has-screenshots added
  • Owner set to audrasjb

I don't know why needs-design-feedback and has-screenshots were removed, but I'm adding back these keywords ad we still need a design feedback on this proposal.

And I'm pinging @karmatosed for a quick review! Thanks!

#11 follow-ups: @karmatosed
12 months ago

My concern here is that we are changing something without considering the system padding and just going for a consistency. For example inputs and buttons in the work within the design system now are 6px 8px. This would be far more desirable to consider for menus than a change here perhaps.

If I look at menus in the system Storybook I find they are now: 6px 12px.

For me, changing these right now doesn't seem right unless it would be more aligned with those menus: https://wordpress.github.io/gutenberg/?path=/docs/components-menugroup--docs&globals=css:wordpress

I think my recommendation would be to either reduce to 6px or not do this. I get the need for equalization and suspect it was done before for visual and/or some browser workaround. Attaching what it looks like at 6px.

Last edited 12 months ago by karmatosed (previous) (diff)

#12 in reply to: ↑ 11 @trushaamin
12 months ago

Replying to karmatosed:

My concern here is that we are changing something without considering the system padding and just going for a consistency. For example inputs and buttons in the work within the design system now are 6px 8px. This would be far more desirable to consider for menus than a change here perhaps.

If I look at menus in the system Storybook I find they are now: 6px 12px.

For me, changing these right now doesn't seem right unless it would be more aligned with those menus: https://wordpress.github.io/gutenberg/?path=/docs/components-menugroup--docs&globals=css:wordpress

I think my recommendation would be to either reduce to 6px or not do this. I get the need for equalization and suspect it was done before for visual and/or some browser workaround. Attaching what it looks like at 6px.

Yes, 6px looks good.

Last edited 12 months ago by trushaamin (previous) (diff)

#13 in reply to: ↑ 11 @dhrumilk
12 months ago

Replying to karmatosed:

My concern here is that we are changing something without considering the system padding and just going for a consistency. For example inputs and buttons in the work within the design system now are 6px 8px. This would be far more desirable to consider for menus than a change here perhaps.

If I look at menus in the system Storybook I find they are now: 6px 12px.

For me, changing these right now doesn't seem right unless it would be more aligned with those menus: https://wordpress.github.io/gutenberg/?path=/docs/components-menugroup--docs&globals=css:wordpress

I think my recommendation would be to either reduce to 6px or not do this. I get the need for equalization and suspect it was done before for visual and/or some browser workaround. Attaching what it looks like at 6px.

6px also looks good to me.

#14 @im3dabasia1
12 months ago

Thank you, @karmatosed, for the review.

I have updated the PR to incorporate your suggestions.

Let me know if you'd like any further tweaks!

#15 @karmatosed
11 months ago

@audrasjb it looks good to me. Let's get this in right before beta 1.

#16 @karmatosed
11 months ago

  • Keywords commit added; needs-design-feedback removed

#17 @audrasjb
11 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 59875:

Administration: Adjust submenu padding in admin menu.

This changeset adjusts the padding for submenu link groups in the admin menu, ensuring consistent top and bottom padding.

Follow-up to [26072].

Props trushaamin, modi2918, hellofromTonya, peterwilsoncc, sabernhardt, im3dabasia1, audrasjb, karmatosed, dhrumilk.
Fixes #61689.

Note: See TracTickets for help on using tickets.