Skip to content

Commit b14d3d0

Browse files
MAkerboomoliviertassinari
authored andcommitted
[TextField] Improve chrome autofill dark theme support (#17863)
1 parent 032f7e9 commit b14d3d0

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

packages/material-ui/src/FilledInput/FilledInput.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ export const styles = theme => {
106106
/* Styles applied to the `input` element. */
107107
input: {
108108
padding: '27px 12px 10px',
109+
'&:-webkit-autofill': {
110+
WebkitBoxShadow: theme.palette.type === 'dark' ? '0 0 0 100px #266798 inset' : null,
111+
WebkitTextFillColor: theme.palette.type === 'dark' ? '#fff' : null,
112+
borderTopLeftRadius: 'inherit',
113+
borderTopRightRadius: 'inherit',
114+
},
109115
},
110116
/* Styles applied to the `input` element if `margin="dense"`. */
111117
inputMarginDense: {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ export const styles = theme => {
6565
/* Styles applied to the `input` element. */
6666
input: {
6767
padding: '18.5px 14px',
68+
'&:-webkit-autofill': {
69+
WebkitBoxShadow: theme.palette.type === 'dark' ? '0 0 0 100px #266798 inset' : null,
70+
WebkitTextFillColor: theme.palette.type === 'dark' ? '#fff' : null,
71+
borderRadius: theme.shape.borderRadius,
72+
},
6873
},
6974
/* Styles applied to the `input` element if `margin="dense"`. */
7075
inputMarginDense: {

0 commit comments

Comments
 (0)