Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/mui-material/src/FilledInput/FilledInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,14 @@ const FilledInputInput = styled(InputBaseInput, {
borderTopLeftRadius: 'inherit',
borderTopRightRadius: 'inherit',
},
[theme.getColorSchemeSelector('light')]: {
'&:-webkit-autofill': {
WebkitBoxShadow: theme.vars.palette.Input.autofillWebkitShadowBox,
},
},
[theme.getColorSchemeSelector('dark')]: {
'&:-webkit-autofill': {
WebkitBoxShadow: '0 0 0 100px #266798 inset',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change should be minimal here with a new token used and for light mode.

WebkitBoxShadow: theme.vars.palette.Input.autofillWebkitShadowBox,
WebkitTextFillColor: '#fff',
caretColor: '#fff',
},
Expand Down
7 changes: 6 additions & 1 deletion packages/mui-material/src/OutlinedInput/OutlinedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,14 @@ const OutlinedInputInput = styled(InputBaseInput, {
'&:-webkit-autofill': {
borderRadius: 'inherit',
},
[theme.getColorSchemeSelector('light')]: {
'&:-webkit-autofill': {
WebkitBoxShadow: theme.vars.palette.Input.autofillWebkitShadowBox,
},
},
[theme.getColorSchemeSelector('dark')]: {
'&:-webkit-autofill': {
WebkitBoxShadow: '0 0 0 100px #266798 inset',
WebkitBoxShadow: theme.vars.palette.Input.autofillWebkitShadowBox,
WebkitTextFillColor: '#fff',
caretColor: '#fff',
},
Expand Down
6 changes: 6 additions & 0 deletions packages/mui-material/src/styles/createThemeFoundation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ export interface PaletteFilledInput {
disabledBg: string;
}

export interface PaletteInput {
autofillWebkitShadowBox: string;
}

export interface PaletteLinearProgress {
primaryBg: string;
secondaryBg: string;
Expand Down Expand Up @@ -236,6 +240,7 @@ export interface ColorSystemOptions {
Button?: Partial<PaletteButton>;
Chip?: Partial<PaletteChip>;
FilledInput?: Partial<PaletteFilledInput>;
Input?: Partial<PaletteInput>;
LinearProgress?: Partial<PaletteLinearProgress>;
Skeleton?: Partial<PaletteSkeleton>;
Slider?: Partial<PaletteSlider>;
Expand Down Expand Up @@ -269,6 +274,7 @@ export interface CssVarsPalette {
Button: PaletteButton;
Chip: PaletteChip;
FilledInput: PaletteFilledInput;
Input: Partial<PaletteInput>;
LinearProgress: PaletteLinearProgress;
Skeleton: PaletteSkeleton;
Slider: PaletteSlider;
Expand Down
2 changes: 2 additions & 0 deletions packages/mui-material/src/styles/createThemeWithVars.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
PaletteButton,
PaletteChip,
PaletteFilledInput,
PaletteInput,
PaletteLinearProgress,
PaletteSkeleton,
PaletteSlider,
Expand Down Expand Up @@ -58,6 +59,7 @@ export type {
PaletteButton,
PaletteChip,
PaletteFilledInput,
PaletteInput,
PaletteLinearProgress,
PaletteSkeleton,
PaletteSlider,
Expand Down
3 changes: 3 additions & 0 deletions packages/mui-material/src/styles/createThemeWithVars.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export default function createThemeWithVars(options = {}, ...args) {
'Button',
'Chip',
'FilledInput',
'Input',
'LinearProgress',
'Skeleton',
'Slider',
Expand Down Expand Up @@ -312,6 +313,7 @@ export default function createThemeWithVars(options = {}, ...args) {
setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');
setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');
setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');
setColor(palette.Input, 'autofillWebkitShadowBox', 'unset');
setColor(
palette.LinearProgress,
'primaryBg',
Expand Down Expand Up @@ -461,6 +463,7 @@ export default function createThemeWithVars(options = {}, ...args) {
setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');
setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');
setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');
setColor(palette.Input, 'autofillWebkitShadowBox', '0 0 0 100px #266798 inset');
setColor(
palette.LinearProgress,
'primaryBg',
Expand Down
1 change: 1 addition & 0 deletions packages/mui-material/src/styles/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export type {
PaletteColorChannel,
PaletteCommonChannel,
PaletteFilledInput,
PaletteInput,
PaletteLinearProgress,
PaletteSkeleton,
PaletteSlider,
Expand Down
Loading