[whatwg] Customize HTML5 forms placeholder style

On 2/22/10 6:08 AM, Dean Edwards wrote:
> Yes, I'm suggesting redefining how :empty works. For elements that
> cannot have children

There is no such thing in XML.

> it could mean having no content. e.g. An<input> with no value or an<img>  with no src.

So this would need to be defined on the document language level, not in 
CSS.  Sounds to me like you actually want a new psuedo-class with about 
your description the matching of which CSS would defer to the document 
language.

> There is a small chance that it could break some pages I guess.

So why is it worth it, then?

> I always wanted a pseudo-class that could match<input>  with no value.
> Extending :empty is probably a bad idea but something like :no-value
> would be useful.

I'd be fine with :no-value, I think, though it could easily be misused 
due to unexpected situations when it happens (e.g. a text input that I'm 
typing in and delete all the text but am about to type more text is 
:no-value, right?).

-Boris

Received on Monday, 22 February 2010 07:11:05 UTC