From a1cf144af90e01d4730ff7fbec643f8eef805ce1 Mon Sep 17 00:00:00 2001 From: Rachel Bratt Tannenbaum Date: Thu, 14 Mar 2024 11:28:30 +0200 Subject: [PATCH] fix(text-field): remove browser autofill style (VIV-1641) (#1634) --- libs/components/src/lib/text-field/text-field.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libs/components/src/lib/text-field/text-field.scss b/libs/components/src/lib/text-field/text-field.scss index 86cd69a05d..99ba688217 100644 --- a/libs/components/src/lib/text-field/text-field.scss +++ b/libs/components/src/lib/text-field/text-field.scss @@ -171,6 +171,17 @@ $low-ink-color: --_low-ink-color; ) !important; /* 1. sets text fill to current `color` for safari */ } + &::slotted(input:-webkit-autofill), + &:not(slot):-webkit-autofill { + /* stylelint-disable */ + -webkit-box-shadow: 0 0 0 1000px + var(#{appearance.get-appearance-token(fill)}) inset; + -webkit-text-fill-color: var( + #{appearance.get-appearance-token(text)} + ) !important; + /* stylelint-enable */ + } + .has-icon &:not(slot), .has-icon &::slotted(input) { padding-inline-start: calc(