I am working with an angular reactive form and I want to dynamically change the background color of all input fields when their value is changed. Some of these input fields are pre-populated and not required. I came across a potential solution on Stack Overflow, but it seems to require my input fields to be marked as required:
<div class="form-group">
<input type="text" class="form-control" required>
</div>
.form-control:valid {
background-color: #96d3ec!important;
}
I'm curious if the form-control class supports something like this:
.form-control:changed {
background-color: #96d3ec!important;
}