Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Form autofill hiding text in Chrome and Safari: how to fix it

PRF-200Low impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

Autofill is the browser feature that fills in your name, email, phone or address from saved details. When it fills a field, Chrome and Safari add the :-webkit-autofill state to the input and paint it with a default background (often light blue or pale yellow).

The problem appears when your form uses light text, or a dark theme, or a transparent field on a coloured section. The browser overrides the background but your text colour stays. Result: white text on a pale yellow field, or text that looks faded and cannot be read. Some themes also show a mismatched fill that clashes with the design.

Why it costs you leads or sales

Autofill is meant to speed up forms. If the filled values are unreadable, people cannot check them. Some will clear the field and retype, some will submit a typo they could not see, and some will leave. The impact is usually small and limited to certain browsers and themes, but it hits the visitors who were fastest to convert.

Where autofill styling breaks the journey
  1. Open formPage loads normally
  2. Autofill fills fieldsBrowser adds pale background
  3. Read the valuesLight text on pale fill
  4. Submit formVisitor hesitates or leaves
  5. Lead arrivesNever happens

The form works technically, but the visitor cannot read what was filled in.

Autofill makes the text unreadable

The form loads, autofill applies, and the filled text cannot be read.

How to check if your site has it

Test autofill on your own forms
  1. Save test details in the browser

    In Chrome, open Settings > Autofill and passwords > Addresses and more, and add a test address, phone and email. In Safari, add a contact card and enable Settings > AutoFill.

  2. Open the form in a normal window

    Click into the first field and pick the suggestion. Check every filled field for contrast and colour mismatch.

  3. Repeat on dark sections and dark mode

    Test any form on a dark background, and test with your operating system in dark mode, because that is where the problem is most common.

  4. Test both browsers and mobile

    Try Chrome on desktop, Safari on macOS and Safari on iPhone. Their autofill colours differ.

  5. Inspect the field

    In DevTools, right-click the filled input and choose Inspect. In the Styles pane, look for a user agent rule on input:-webkit-autofill that sets the background.

How to fix it

Browsers do not let you simply set background-color on an autofilled field. The usual fix is to cover the fill with a large inset box-shadow in your colour, and set the text colour with -webkit-text-fill-color.

Autofill fix: match your field colourscss
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #111111;
  caret-color: #111111;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 5000s ease-in-out 0s;
}
Where to add the CSS
  1. Open the Customizer

    Go to Appearance > Customize > Additional CSS (classic themes). With block themes, use Appearance > Editor > Styles > Additional CSS.

  2. Paste the snippet

    Paste the CSS and publish. If your form plugin sets its own colours, target its field class too.

Autofilled field before and after the fix

Before

  • Browser paints a pale fill
  • Your light text colour stays
  • Values are hard to read
  • Visitors retype or leave

After

  • Field keeps your own colours
  • Text colour is set explicitly
  • Values are clearly readable
  • Visitors check and submit

How to confirm it's fixed

Confirmation checks
  • Autofill each field type in Chrome on desktop and read every value.
  • Repeat in Safari on macOS and on an iPhone.
  • Test with the system in light mode and dark mode.
  • Test the form on any dark or coloured section.
  • Check focus and hover states still look right.
  • Submit a test lead and confirm the values arrive correctly.

How to prevent it happening again

Put the autofill rule in your shared form styles, not on a single page, so new forms inherit it. When you change brand colours or add a dark theme, update the colours in the rule. Add autofill to your pre-launch checklist for any new form or redesign.

How FunnelGuard handles this

FunnelGuard does not check for this yet. Autofill styling is a visual detail that depends on the browser's saved data, so it is only a possible future check.

What FunnelGuard does cover nearby: a robot visitor runs your real journeys on a schedule, completes the lead form, checks each step and the tracking hits, and confirms test leads reach the inbox and CRM. If a form breaks outright, you get one alert with a screenshot and a likely cause. It will not tell you that autofilled text looks unreadable.

To watch for it yourself, re-run the autofill test above after every theme, plugin or brand colour change, and keep a saved test profile in Chrome and Safari. You can also use browser DevTools to emulate dark mode and review each form.

Questions people ask

Why is my autofilled text white or invisible in Chrome?

Chrome paints autofilled fields with its own pale background but may keep your text colour. If your text is light, it ends up pale on pale. Set -webkit-text-fill-color and an inset box-shadow on input:-webkit-autofill to fix it.

How do I change the autofill background colour in Chrome?

You cannot set background-color directly because the browser overrides it. Use a large inset shadow instead, for example box-shadow: 0 0 0 1000px #fff inset, on the :-webkit-autofill state.

Why do my form fields turn yellow or blue after autofill?

That is the browser's default autofill highlight. Chrome and Safari add it to show a field was filled automatically. You can override it with CSS using the :-webkit-autofill selector.

Does autofill styling affect Firefox?

Firefox uses the :autofill pseudo-class and usually handles colours differently. The :-webkit-autofill fix targets Chrome, Safari and other WebKit or Blink browsers, so test Firefox separately.

Should I turn autocomplete off to avoid autofill styling problems?

No. Turning autocomplete off removes a feature visitors like and browsers often ignore it. Fix the styling instead and keep proper autocomplete values like email and tel.

Why does autofill look wrong only in dark mode?

Dark themes usually use light text, and the browser's pale autofill fill clashes with it. Set both the text colour and the inset shadow colour in your autofill rule to match your dark field style.

Does FunnelGuard detect autofill styling problems?

No. FunnelGuard does not check this yet. It does monitor your real form journeys, tracking and lead delivery, so you still need a manual autofill test after design changes.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.