Remove new Firefox autofill color

Ejdrien picture Ejdrien · Mar 18, 2019 · Viewed 7.4k times · Source

A few days ago my Firefox Developer Edition updated to version 67.0b2 (64 bit). Since then all autofilled input fields have a yellow background, on literally every website.

How can I get rid of the yellow autofill color?

Changing inset box-shadow color doesn't seem to work like it does in Chrome.

Answer

Ejdrien picture Ejdrien · Mar 24, 2019

After few sleepless nights I've finally figured out how to get rid of the autofill colors!
It's really simple, all you have to do is to add this to your css:

input {
  filter: none;
}

It's because at the bottom of view-source:resource://gre-resources/forms.css we can see this:

:-moz-autofill, :-moz-autofill-preview {
  filter: grayscale(21%) brightness(88%) contrast(161%) invert(10%) sepia(40%) saturate(206%);
}

Which basically messes up your colors. I'm not sure if this is new in version 67.0b2 but it's nice to know it's there.
EDIT: This fix works for every Firefox browser with version 67.0 or higher.
EDIT 2: If you are looking for global fix for your Firefox, not just for your website you're creating, and you don't know how to add something to your Firefox's CSS then have a look here