For instance, a freshly loaded form contains an <input type="text">
which has a green background colour. Once the user enters a value into the field, I would like it to be coloured blue instead.
Is it possible to accomplish this purely using CSS? I understand there is the input[type='text'][value]
selector. However, this does not reflect any changes to the form made by the user after it has finished loading, so if the form loaded with no value, it would remain unchanged regardless of what the user does.