diff --git a/packages/react/src/components/TextInput/TextInput.stories.js b/packages/react/src/components/TextInput/TextInput.stories.js index 139f29969e27..026bc7d86eed 100644 --- a/packages/react/src/components/TextInput/TextInput.stories.js +++ b/packages/react/src/components/TextInput/TextInput.stories.js @@ -47,6 +47,7 @@ export const TogglePasswordVisibility = () => { id="text-input-1" labelText="Text input label" helperText="Optional help text" + autoComplete="true" /> ); }; diff --git a/packages/styles/scss/components/form/_form.scss b/packages/styles/scss/components/form/_form.scss index 86ca02a4d8d5..b1725bfc391d 100644 --- a/packages/styles/scss/components/form/_form.scss +++ b/packages/styles/scss/components/form/_form.scss @@ -20,6 +20,17 @@ $input-label-weight: 400 !default; @mixin form { + // Override Chrome autocomplete styles + input:-webkit-autofill, + input:-webkit-autofill:hover, + input:-webkit-autofill:focus, + textarea:-webkit-autofill, + textarea:-webkit-autofill:hover, + textarea:-webkit-autofill:focus { + box-shadow: 0 0 0 1000px $field inset; + -webkit-text-fill-color: $text-primary; + } + .#{$prefix}--fieldset { @include reset; }