Closed
Description
A 4px margin was added to the top and bottom of ListItemText
in #15339, causing an inconsistency between items that use it and items that just have a string child.
- 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 😯
The MenuItems
in this JSX render with different heights when the viewport width >= 600:
<MenuList>
<MenuItem style={{ backgroundColor: "green" }}>
without ListItemText
</MenuItem>
<MenuItem style={{ backgroundColor: "red" }}>
<ListItemText>with ListItemText</ListItemText>
</MenuItem>
</MenuList>
When the viewport is narrower than 600px, a media query deactivates and their minHeight
becomes 48px (ironically causing them to get taller on narrower screens...)
Expected Behavior 🤔
The menu items are the same height, like they used to be
Steps to Reproduce 🕹
https://codesandbox.io/s/blazing-resonance-oqiso?file=/src/Demo.js
Context 🔦
Discovered this working on material-ui-popup-state
demos.
Your Environment 🌎
Refer to code sandbox for versions