[CssBaseline] TextField component change size, by adding value inherit to box-sizing property when Text Primary or Background Default color are changed in theme #33907
Labels
bug 馃悰
Something doesn't work
component: CssBaseline
The React component
component: text field
This is the name of the generic UI component, not the React module!
Duplicates
Latest version
Current behavior 馃槸
When you change the color to Text Primary o Background Default properties in theme, the TextField component gets te box-sizing: inherit css property and change inner size of input, where goes the value.
Here a codesandbox that can replicate the bug.
Expected behavior 馃
Been able to change color to Text Primary or Background Default properties in theme without affecting TextField size component.
Steps to reproduce 馃暪
Steps:
In the codesandbox, the first button just create a theme, based on a toggle, with two diffent Primary Main color, so you'll see no change in size on the TextField component.
The second button does the same but with Background Default and Paper color. When you use the theme with the Background Color changed, the input change size, but when you press again, it only change Background Paper color, and the input size it's not changed.
The same work for the third button, but when you press it, it create a theme with Text Primary color changed, and the input change size, but when you press it again, it only change Text Secondary, and the input size it's not changed.
Context 馃敠
We are creating this Desing System, and the issue affect the way the user interact with this tool, because when they change a color, it should only change the color, not adding other css properties to other components.
Your environment 馃寧
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: