Skip to content

Commit fa7f197

Browse files
authored
[TextField] Fix caret color in autofill dark theme (#20857)
1 parent 06ac0b2 commit fa7f197

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export const styles = (theme) => {
115115
'&:-webkit-autofill': {
116116
WebkitBoxShadow: theme.palette.type === 'dark' ? '0 0 0 100px #266798 inset' : null,
117117
WebkitTextFillColor: theme.palette.type === 'dark' ? '#fff' : null,
118+
caretColor: theme.palette.type === 'dark' ? '#fff' : null,
118119
borderTopLeftRadius: 'inherit',
119120
borderTopRightRadius: 'inherit',
120121
},

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export const styles = (theme) => {
7575
'&:-webkit-autofill': {
7676
WebkitBoxShadow: theme.palette.type === 'dark' ? '0 0 0 100px #266798 inset' : null,
7777
WebkitTextFillColor: theme.palette.type === 'dark' ? '#fff' : null,
78+
caretColor: theme.palette.type === 'dark' ? '#fff' : null,
7879
borderRadius: 'inherit',
7980
},
8081
},

0 commit comments

Comments
 (0)