Skip to content

Commit

Permalink
[OutlinedInput] Resolve border color issue on mobile (#43797) (#43879)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtek35 authored Oct 5, 2024
1 parent 842e4e7 commit e73c8a9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/mui-material/src/OutlinedInput/OutlinedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ const OutlinedInputRoot = styled(InputBaseRoot, {
[`&:hover .${outlinedInputClasses.notchedOutline}`]: {
borderColor: (theme.vars || theme).palette.text.primary,
},
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
[`&:hover .${outlinedInputClasses.notchedOutline}`]: {
borderColor: theme.vars
? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)`
: borderColor,
},
},
[`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {
borderWidth: 2,
},
Expand All @@ -68,14 +76,6 @@ const OutlinedInputRoot = styled(InputBaseRoot, {
{
props: {}, // to overide the above style
style: {
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
[`&:hover .${outlinedInputClasses.notchedOutline}`]: {
borderColor: theme.vars
? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)`
: borderColor,
},
},
[`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]: {
borderColor: (theme.vars || theme).palette.error.main,
},
Expand Down

0 comments on commit e73c8a9

Please sign in to comment.