[List] ListItemIcon color is too strict
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
When hovering on a list item containing: ListItemText, ExpandLess and ListItemIcon, we see that the ListItemText and ExpandLess icon receive a hover color. This is fairly simple:
This doesn’t include the ListItemIcon however
Expected Behavior 🤔
We want this
Steps to Reproduce 🕹
The code for the expected behavior is a bit strange:
https://codesandbox.io/s/material-demo-forked-l8nyn?file=/demo.js
->
Your Environment 🌎
System:
OS: Windows 10 10.0.17763
Binaries:
Node: 12.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 90.0.4430.93
Edge: Not Found
npmPackages:
@material-ui/core: ^4.11.3 => 4.11.3
@material-ui/icons: ^4.11.2 => 4.11.2
@material-ui/styles: 4.11.3
@material-ui/system: 4.11.3
@material-ui/types: 5.1.0
@material-ui/utils: 4.11.2
@types/react: 17.0.3
react: ^17.0.2 => 17.0.2
react-dom:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
[List] ListItemIcon color is too strict #26267 - mui/material-ui
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >Change Color in react material UI ListItemIcon - Stack Overflow
I am trying listitem icon red but not getting ...
Read more >React MUI ListItemIcon API - GeeksforGeeks
Syntax: Create ListItemIcon in List as follows. ... 2: In the following example, we have different colors for different ListItemIcons.
Read more >ListItemIcon API - Material UI - MUI
A simple wrapper to apply List styles to an Icon or SvgIcon . Component name. The name MuiListItemIcon can be used when providing...
Read more >Icon List Widget - Elementor
Learn everything about Icon List Widget in this article from Elementor's ... of the divider relative to the container; Color: Choose the divider's...
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
I had explored the color part of this issue in #24941. I have tried something but it didn’t work back then. Maybe we could continue from this proposal: https://github.com/mui-org/material-ui/issues/24941#issuecomment-785986913?
output:
with a
style={{ color: 'red' }}
on the second<ListItem>
.I think
ListItemIcon
works as expected because of the styling below so thecolor
is needed to be overridden.