diff --git a/CHANGELOG.md b/CHANGELOG.md index 398e39290be..4f398d8761b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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** diff --git a/src/global_styling/mixins/_form.scss b/src/global_styling/mixins/_form.scss index 5f26419aa72..7ab69ae4d68 100644 --- a/src/global_styling/mixins/_form.scss +++ b/src/global_styling/mixins/_form.scss @@ -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) {