fix(client): keep Chrome autofill background within the rounded input
The autofill inset shadow was bleeding past the rounded corners. Clip it via overflow: hidden on the outlined input root and bump the override rules to !important so they beat Chrome's user-agent styles.
This commit is contained in:
1 parent
ddfcb09a12
commit
48328c0e94
1 file changed
+3
-3
@@ -26,6 +26,7 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(function T
|
|||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
height: 34,
|
height: 34,
|
||||||
fontSize: typographyLevels.base,
|
fontSize: typographyLevels.base,
|
||||||
|
overflow: "hidden",
|
||||||
},
|
},
|
||||||
"& .MuiOutlinedInput-notchedOutline": {
|
"& .MuiOutlinedInput-notchedOutline": {
|
||||||
borderColor: theme.palette.divider,
|
borderColor: theme.palette.divider,
|
||||||
@@ -40,10 +41,9 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(function T
|
|||||||
},
|
},
|
||||||
"& input:-webkit-autofill, & input:-webkit-autofill:hover, & input:-webkit-autofill:focus, & input:-webkit-autofill:active":
|
"& input:-webkit-autofill, & input:-webkit-autofill:hover, & input:-webkit-autofill:focus, & input:-webkit-autofill:active":
|
||||||
{
|
{
|
||||||
WebkitBoxShadow: `0 0 0 100px ${theme.palette.background.paper} inset`,
|
WebkitBoxShadow: `0 0 0 100px ${theme.palette.background.default} inset !important`,
|
||||||
WebkitTextFillColor: theme.palette.text.primary,
|
WebkitTextFillColor: `${theme.palette.text.primary} !important`,
|
||||||
caretColor: theme.palette.text.primary,
|
caretColor: theme.palette.text.primary,
|
||||||
borderRadius: theme.shape.borderRadius,
|
|
||||||
transition: "background-color 5000s ease-in-out 0s",
|
transition: "background-color 5000s ease-in-out 0s",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in new issue
Block a user