Problem/Motivation

Browsers are using internal styles to change background color of input elements that are auto filled. This usually looks bad and not aligned with theme design. We should reset input bg color back to original state that is defined with `$input-bg` SASS variable.

Comments

pivica created an issue. See original summary.

pivica’s picture

Here is a patch.

Additionally Chrome is changing font size of input while you do actual selection of auto fill options, when you select some option the font size is restored to original value. This is not possible to fix for now because Chrome is using internal style with `!important` statement and we can not override this.

pivica’s picture

Status: Active » Needs review
pivica’s picture

StatusFileSize
new1.93 KB
new2.43 KB

Disabling autofill bg color for inputs is not something that everybody will like because information about auto filed input fields will be lost visually. We will add a new SASS variable for this so custom theme can decide will it want to reset this bg color, use some other color or disable resetting so default browser colors are used.

pivica’s picture

StatusFileSize
new3.45 KB
new2.72 KB

Well this is a bit complex, browsers, well Chrome is really doing a lot of overrides here with an !important flag and that is making our life difficult - no idea why they thought this is a good idea...

Here is a new patch, added a mixin so rule can be used easily in custom CSS code and added color override hack.

pivica’s picture

StatusFileSize
new2.95 KB
new1.53 KB

Added helper function `bs-input-autofill-box-shadow` so box shadow value can be easily reused or overridden.

  • pivica committed b99f5bd on 8.x-1.x
    Issue #3256665 by pivica: Browsers are changing input bg color on...
pivica’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.