Skip to content

Commit e73c8a9

Browse files
[OutlinedInput] Resolve border color issue on mobile (#43797) (#43879)
1 parent 842e4e7 commit e73c8a9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/mui-material/src/OutlinedInput/OutlinedInput.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ const OutlinedInputRoot = styled(InputBaseRoot, {
5151
[`&:hover .${outlinedInputClasses.notchedOutline}`]: {
5252
borderColor: (theme.vars || theme).palette.text.primary,
5353
},
54+
// Reset on touch devices, it doesn't add specificity
55+
'@media (hover: none)': {
56+
[`&:hover .${outlinedInputClasses.notchedOutline}`]: {
57+
borderColor: theme.vars
58+
? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)`
59+
: borderColor,
60+
},
61+
},
5462
[`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {
5563
borderWidth: 2,
5664
},
@@ -68,14 +76,6 @@ const OutlinedInputRoot = styled(InputBaseRoot, {
6876
{
6977
props: {}, // to overide the above style
7078
style: {
71-
// Reset on touch devices, it doesn't add specificity
72-
'@media (hover: none)': {
73-
[`&:hover .${outlinedInputClasses.notchedOutline}`]: {
74-
borderColor: theme.vars
75-
? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)`
76-
: borderColor,
77-
},
78-
},
7979
[`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]: {
8080
borderColor: (theme.vars || theme).palette.error.main,
8181
},

0 commit comments

Comments
 (0)