Skip to content

Commit

Permalink
Fix autofill styling in Chrome (#2798)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadelrio authored Feb 3, 2020
1 parent 392e64d commit 4f2e52f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Exported missing `EuiSelectProps` type ([#2815](https://github.com/elastic/eui/pull/2815))
- Fixed `EuiCode`'s & `EuiCodeBlock`'s ability to accept non-string children ([#2792](https://github.com/elastic/eui/pull/2792)) ([#2820](https://github.com/elastic/eui/pull/2820))
- Fixed `EuiSearchBar`, `Query`, and `AST`'s ability to accept literal parenthesis characters ([#2791](https://github.com/elastic/eui/pull/2791))
- Fixed coloring of input fields when autofill is on in Chrome ([#2798](https://github.com/elastic/eui/pull/2798))

**Breaking changes**

Expand Down
11 changes: 11 additions & 0 deletions src/global_styling/mixins/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@
&[readOnly] {
@include euiFormControlReadOnlyStyle;
}

// Needs to be set for autofill
// sass-lint:disable-block no-vendor-prefixes
&:-webkit-autofill {
-webkit-text-fill-color: lightOrDarkTheme($euiColorDarkestShade, $euiColorLightShade);

~ .euiFormControlLayoutIcons {
color: lightOrDarkTheme($euiColorDarkestShade, $euiColorLightShade);
}
}

}

@if ($includeSizes) {
Expand Down

0 comments on commit 4f2e52f

Please sign in to comment.