long text MenuItems should ellipse
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
This might be related: https://github.com/mui-org/material-ui/pull/3250 but i’m not sure
Expected Behavior
Menu item texts should ellipse
Current Behavior
They somehow don’t, not sure why as text-overflow: ellipse
is present
Steps to Reproduce (for bugs)
- https://codesandbox.io/s/p5kj9zw2xq
- resize the screen till it is to small to display the menu items
- realize it doesn’t ellipse
Context
We have some menu item text which are to long on mobile.
Your Environment
Tech | Version |
---|---|
Material-UI | latest |
React | latest |
browser | chrome latest |
etc |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:14 (13 by maintainers)
Top Results From Across the Web
long text MenuItems should ellipse · Issue #11380 - GitHub
We set display block in the menu list item. But I fear it will break the menu composition capabilities with the list item...
Read more >When should I use a ellipsis in a Menu Item - Stack Overflow
You should add ellipses to the end of text only if you're truncating the text (this applies anywhere) ...
Read more >When should an ellipsis be used in menu items? [duplicate]
Use ellipses on a menu item when a user who clicks it must provide further information, filtering or 'refining' the action somehow.
Read more >text-overflow - CSS: Cascading Style Sheets - MDN Web Docs
The text-overflow CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('…
Read more >Menus: UI Text Guidelines - Microsoft Learn
The ellipsis is a visual cue that the user must supply additional information to complete the command. For more information, see the Command ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone stepping into the problem it seems like wrapping the inner content into a div seems to solve the problem for now:
@oliviertassinari thanks for pointing out the problem 👍 - wouldn’t have found the issue without you! Should this perhaps be the default behavior? or at least somehow be noted in the docs?
@nathanmarks Let’s document 2. then 😃. I’m adding the support for
inherit
so we don’t have to know the variant:What do we win? Typography is the low-level text primitive block. Even better, I love how people can build their own Box component in https://github.com/jxnblk/styled-system#usage.