question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OverflowMenu: dropdown menu items with overflow text do not have consistent padding between menu items.

See original GitHub issue

What package(s) are you using?

  • carbon-components
  • carbon-components-vue

Detailed description

Describe in detail the issue you’re having.

In scenarios whereby the text of a dropdown list item is really long, whereby the text overflows to multiple lines, the padding between menu items is inconsistent.

Is this issue related to a specific component?

OverflowMenu

What did you expect to happen? What happened instead? What would you like to see changed?

I would expect that in instances whereby the menu item is long enough that it spreads multiple lines, then the list item itself should dynamically increase in height to facilitate the text.

What browser are you working in?

chrome

What version of the Carbon Design System are you using?

2.18

Steps to reproduce the issue

  1. Step one - Visit an isolated sandbox environment, at https://codesandbox.io/s/carbonvue-overflow-menu-multiline-menu-items-4y7uh
  2. Step two - Observe that the second item spans two lines, whilst the fourth item is so long that is spans 3 lines.
  3. Step three - Observe that the text becomes illegible.

Additional information

Screenshot 2019-11-14 at 15 24 25

As a temporary fix, we have been using:

.my-overflow-item {
  &.bx--overflow-menu-options__option {
    // replace height from core carbon
    height: initial;
    min-height: 2.5rem;
  }

  .bx--overflow-menu-options__btn {
    height: initial;
  }

  .bx--overflow-menu-options__option-content {
    white-space: initial;
    overflow: initial;
    text-overflow: initial;
    margin: 0.7rem 0;
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
laurenmricecommented, Nov 19, 2019
0reactions
asudohcommented, Apr 9, 2020

I see that latest https://react.carbondesignsystem.com/?path=/story/overflowmenu--basic has long menu item, which implements ellipsis.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add padding to actionbar overflow menu items?
Things I have tried: Adding padding to the menu_item style. Adding various different style items to the base theme with the desired padding....
Read more >
Color - Overflow menu – Carbon Design System
Overflow menus are used when additional options are available to the user and there is a space constraint.
Read more >
hide & move items's to dropdown when space runs out
At the end of the navigation menu, there'd be an icon/button, when clicked it activates a menu listing all the list items that...
Read more >
PatternFly 4 • Overflow menu
As the container width changes, the overflow menu will change between a horizontal menu and a vertical dropdown despite the viewport width not...
Read more >
Tabs Usage - Now Component Library | ServiceNow Developers
The overflow menu format mirrors the tab type except for iconic tabs. The overflow items for iconic tabs will display the icon with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found