Gutenberg: Drop down menu: uneven top and bottom spacing

Created on 13 Jul 2020  路  4Comments  路  Source: WordPress/gutenberg

Describe the bug
The "dropdown menu" component has uneven top and bottom spacing. See screenshot below:

Screenshot 2020-07-13 at 17 42 05

It's clear the vertical spacing between the _last_ button and the menu edge is bigger than the one at the top.

Actually, the menu container does have the same padding for all edges.

Instead, all the buttons within the menu had a bottom margin of 4 pixels. The margin of the last button should be reset to 0.

Seems a good first issue that can be fixed with some simple CSS selector.

Expected behavior
The menu to have even spacing.

Editor version (please complete the following information):

  • WordPress version: 5.5 trunk
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? default
Good First Issue

Most helpful comment

Seems so. I can't reproduce the issue on latest plugin version 9.0.0. Closing. See screenshot:

Screenshot 2020-09-19 at 16 31 50

All 4 comments

Seems there's also a small inconsistency between similar "dropdown" menus.

See in the screenshot below, where:

  • buttons in the block "More rich text controls" menu do have a bottom margin
  • button in the block "More options" menu don't

Screenshot 2020-07-15 at 15 25 31

https://github.com/WordPress/gutenberg/blob/7aacd09a832401629d4507b086d7ac3bbbe93e59/packages/components/src/dropdown-menu/style.scss#L11-L17

@afercia This is a great callout, and something I've noticed myself as well. The second screenshot you provided (without the margins) looks most in line with where it needs to go. I am assigning this to myself to address.

Did #24227 resolve this issue?

Seems so. I can't reproduce the issue on latest plugin version 9.0.0. Closing. See screenshot:

Screenshot 2020-09-19 at 16 31 50

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cr101 picture cr101  路  3Comments

mhenrylucero picture mhenrylucero  路  3Comments

ellatrix picture ellatrix  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments

jasmussen picture jasmussen  路  3Comments