I have tried implementing the following solution to correctly style invalid input, great it works on text type fields, however unfortunately it appears to be broken on tel and number fields in both Chrome and FireFox. Does anyone have any alternative solutions for this predicament?
form.standard-form.enhanced {
input:not(:placeholder-shown):invalid {
border: 2px solid #f00;
}
input:not(:placeholder-shown):valid {
border: 2px solid $green;
}
}
Reference link:
https://stackoverflow.com/questions/7920742/delay-html5-invalid-pseudo-class-until-the-first-event#=