From 9916f3ed64a715fb9a31a0fcad6452276e275615 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 9 Mar 2024 13:14:42 +0100 Subject: [PATCH] Completely style the webkit autofill (#29683) Previously it was only partially styled, e.g. there was black text on white background even in dark theme caused by fomantic styles. image Screenshot 2024-03-09 at 02 09 29 Co-authored-by: Giteabot (cherry picked from commit 9b69f76e5a33788150f3abc3dee64010539c6b86) --- web_src/css/base.css | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/web_src/css/base.css b/web_src/css/base.css index 9f402d900..cc74db820 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -883,10 +883,18 @@ img.ui.avatar, border-color: var(--color-error-border) !important; } -/* A fix for text visibility issue in Chrome autofill in dark mode. */ -/* It's a problem from Formatic UI, and this rule overrides it. */ -.ui.form .field.field input:-webkit-autofill { - -webkit-text-fill-color: var(--color-black) !important; +input:-webkit-autofill, +input:-webkit-autofill:focus, +input:-webkit-autofill:hover, +input:-webkit-autofill:active, +.ui.form .field.field input:-webkit-autofill, +.ui.form .field.field input:-webkit-autofill:focus, +.ui.form .field.field input:-webkit-autofill:hover, +.ui.form .field.field input:-webkit-autofill:active { + -webkit-background-clip: text; + -webkit-text-fill-color: var(--color-text); + box-shadow: 0 0 0 100px var(--color-primary-light-6) inset !important; + border-color: var(--color-primary-light-4) !important; } .ui.form .field.muted {