Hacker News new | ask | show | jobs
by uitgewis 3155 days ago
You could potentially use the validation rules, and set a min length of 1.
1 comments

You'd need [required] instead of [minlength] for :valid to work. The other option is :placeholder-shown, to style no-input normally, but it's newer and not as supported.
I wonder if the good old input[value=""] would work. Probably not if you have jQuery.
No, because that matches on the HTML attribute (aka the defaultValue property in JS), not on the current value of the input.