Chip element goes full-width in MS Edge
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
When using the Chip
element, behavior differs in browser. While in Chrome it has width calculated based on label and avatar, in MS Edge the element is 100% width. I did a CodeSandbox snippet to reproduce it.
Expected Behavior
The Chip
should be as narrow as its content, like it does in Chrome
Current Behavior
On MS Edge (versions: Microsoft Edge 41.16299.15.0; Microsoft EdgeHTML 16.16299) the Chip
element is full width
Steps to Reproduce (for bugs)
- CodeSandbox snippet
- Add a
Chip
element to App - The rendering differs in Chrome and Edge
- Wrapping Chip with
inline-flex
container (e.g.Badge
or custom div) fixes an issue.
Context
I’m rendering a statistic page, where Avatar
shows ID and label
displays aggregation data. I show each chip on new line (in a narrow Grid
element) so it’s not a big problem, but in this case Avatar is not left-most.
Your Environment
Tech | Version |
---|---|
Material-UI | 1.0.0-beta.24 |
React | 16.2 |
browser | Edge |
Microsoft Edge | 41.16299.15.0 |
Microsoft EdgeHTML | 16.16299 |
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Chip element goes full-width in MS Edge · Issue #9615 - GitHub
When using the Chip element, behavior differs in browser. While in Chrome it has width calculated based on label and avatar, in MS...
Read more >Header and content always full width on Microsoft Edge and ...
In Microsoft Edge and Microsoft Internet Explorer, the header as well as all content are always in full width and the site looks...
Read more >How to fix Microsoft Edge displaying incorrect table cell widths ...
When a child element with a defined width is placed within the bottom cell which has a colspan , Microsoft Edge displays the...
Read more >How To Hide Scrollbars With CSS - W3Schools
IE and Edge supports the -ms-overflow-style: property, and Firefox supports the scrollbar-width property, which allows us to hide the scrollbar, but keep ...
Read more >Use web parts with the full-width column | Microsoft Learn
Modern pages in communication sites offer an additional section layout named Full-width column. This layout spans the full width of the page ...
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
@oliviertassinari I discovered this fix as I have some
Chips
wrapped inBadge
. But looks like it works even if applied toChip
itself, without wrapping:I think it’s OK. The chip element is inline by design, so this solution looks natural.
I hope it does not break other cases.
I take a look at styles and see that
Chip
Element haswidth: fit-content
. But intrinsic-width properties are not supported by MS: caniuse and Edge dev site. It’s under consideration with low priority.