Remove new Firefox autofill color

旧时模样 提交于 2020-01-22 14:55:46

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/55228377/remove-new-firefox-autofill-color

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!