CSS Selector Classes in styleOverrides Error: MUI: The MuiMenuItem
component increases the CSS specificity of...
#30727
Labels
MuiMenuItem
component increases the CSS specificity of...
#30727
Duplicates
Latest version
Current behavior 馃槸
Tried defining CSS selector class styles using components.MuiMenuItem.styleOverrides, but I keep getting a browser error regarding increasing the CSS specificity for selectors.
I can get around the issue when doing the following, but I don't think this is the ideal approach based on what I've read.
Expected behavior 馃
According to documentation, these properties should be accessible in components.MuiMenuItem.styleOverrides and should not cause browser errors.
Steps to reproduce 馃暪
Steps:
Context 馃敠
I can work around this issue by applying the selector styles directly in root, but then I am using more string-based properties. It's also bothersome when implementation does not match specification/documentation. I did find a workaround, but I don't think it's the correct approach, as it creates more noise in the code by involving interpolated string props.
Your environment 馃寧
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: