Why is input:invalid true when the input is empty?
问题 Currently I'm trying to emulate this example. This works fine, however it has got one big restraint: it only works when your input type is text. When you use another input type, let's say email, a basic string isn't valid, so the placeholder falls over the text. So in my eyes there are to solutions to this problem: Use type=text everywhere, which is kinda crappy, because on mobile phones for example you won't get the email-type keyboard. Use JavaScript to check if the input has a value. I