Try typing an illegal e-mail address, to see the styling disappear.
Note: The :valid selector is not supported in Internet Explorer 9 and earlier versions.