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.

No way to override style of a floating <OverflowMenu>in v9

See original GitHub issue

Summary

I would open this issue against [https://github.com/carbon-design-system/carbon-components-react] but apparently this is the new place…

In Carbon V9 (specifically, carbon-components-react@6) it is not possible to override the styling of an <OverflowMenu floatingMenu /> to e.g. make it wider. Specifically, the options themselves. As with nearly all Carbon components it is possible to pass a className prop into the component, which can then be targeted to alter rendering. Unfortunately, when the menu options are floating, they appear at a completely different location in the DOM from where the injected className goes. So all we can do is alter the rendering of the menu icon.

Justification

This would be useful for making the floating menu bigger, so that longer menu options are easier to read.

Desired UX and success metrics

Something like: when a <OverflowMenu floatingMenu optionsClassName='x' /> is opened, the <ul> which gets appended to the DOM should have class='x' on it.

“Must have” functionality

That’s about it!

Specific timeline issues / requests

Soon as you like, really. This is a simple request so if this isn’t likely to appear in the next week I may be able to put together a PR myself.

Available extra resources

I’ll try to patch this myself if I have to…

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
s100commented, Jun 3, 2019

@asudoh: raised #2907.

0reactions
stale[bot]commented, Jul 17, 2019

As there’s been no activity since this issue was marked as stale, we are auto-closing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to override Inline Style CSS? - Stack Overflow
<input class="button cool-button" style="float: right ; color:blue" ... and the float:none in the css sheet will override the float: right that is inline....
Read more >
Styles and Themes - Android Developers
To extend a style, specify the style you want to extend with the parent attribute. You can then override the inherited style attributes...
Read more >
overflow-x - CSS: Cascading Style Sheets - MDN Web Docs
The overflow-x CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, ...
Read more >
overflow - CSS-Tricks
Setting overflow doesn't clear the float at the element, it self-clears. This means that the element with overflow (any value except visible ) ......
Read more >
Floating Action Button (FAB) in Android with Example
In the activity_main.xml file add the floating action buttons and invoke the following code. Now invoke the normal FAB. Which is of 56dp...
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