Forum Discussion

Steve_Taylor's avatar
Steve_Taylor
Copper Contributor
Feb 24, 2023

Edge user-agent style sheet has !important tag set on background-color for input tag

Today I have noticed that, in Edge, version 110.0.1587.50 (64-bit), my intranet application is no longer able to set a background color for input fields (i.e. html <input> tag). The reason seems to be that !important is set for background-color in the browser's user-agent style sheet for input:-internal-autofill-selected.

 

As I understand it, when !important is set in a particular style sheet, this inverts the normal order of precedence for applying styles from (1) the author style sheet, (2) the user style sheet, and (3) the user-agent style sheet. In other words, if !important is set for a style in the user-agent style sheet, that will prevent that style being overridden in either the user or author style sheets.

 

This overridden style behavior for the input tag seems to be very recent, and also seems to be a problem in Chrome, so I'm wondering if it could perhaps be due to a bug in the underlying Chromium project, maybe?

 

Anyway, if anyone has a solution to this I would be most grateful if you could pass it on, please.

 

Many thanks,

Steve Taylor

No RepliesBe the first to reply

Resources