[TextField] legend
style conflicts with Bootstrap when no label is set
#34298
Labels
bug 🐛
Something doesn't work
component: text field
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
Duplicates
Latest version
Current behavior 😯
<TextField size={"small"} variant="outlined" placeholder="No label" />
Expected behavior 🤔
Steps to reproduce 🕹
Steps:
bootstrap
to the projecthttps://codesandbox.io/s/peaceful-mayer-rhzhle?file=/src/App.tsx
Context 🔦
I have bootstrap throughout my application, and I also want to have MUI TextFields, sometimes without a label.
I think this bug has been issued in #19463, but looking at the PRs, I think the fix isn't complete and simply ignores the case when no label is set.
Manually adding
width: auto;
to thelegend
fixes the layout.Your environment 🌎
npx @mui/envinfo
Tested on Firefox 102.0esr and Chrome 105.
The text was updated successfully, but these errors were encountered: