Is there a way to apply a CSS selector such as focus
to an element with two classes?
For example:
Given the following two classes in my CSS file:
.form__input:focus {
border-color: blue;
background: #ffffff;
}
.form__input-error {
color: red;
border-color: red;
}
is it possible to add the next:
.form__input .form__input-error:focus {
color: red;
border-color: red;
background: #ffffff
}
I am asking, because in my specific case this is not working. I am not sure though whether this is due to the CSS or due to some javascript that I am performing.