Skip to content

Commit

Permalink
fix(input): override Chrome autocomplete styles (#12512)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
tw15egan and kodiakhq[bot] authored Nov 9, 2022
1 parent 531887f commit cfa54da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const TogglePasswordVisibility = () => {
id="text-input-1"
labelText="Text input label"
helperText="Optional help text"
autoComplete="true"
/>
);
};
Expand Down
11 changes: 11 additions & 0 deletions packages/styles/scss/components/form/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cfa54da

Please sign in to comment.