Y
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
KwanEsq
3155 days ago
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.
link
vilmosi
3155 days ago
I wonder if the good old input[value=""] would work. Probably not if you have jQuery.
link
bzbarsky
3155 days ago
No, because that matches on the HTML attribute (aka the defaultValue property in JS), not on the current value of the input.
link