W3C home > Mailing lists > Public > www-style@w3.org > March 2012

Re: [selectors4] :empty psuedo class and input fields

From: Mounir Lamouri <mounir@lamouri.fr>
Date: Mon, 12 Mar 2012 15:37:19 +0100
Message-ID: <4F5E0A1F.8060707@lamouri.fr>
To: www-style@w3.org
On 03/12/2012 11:03 AM, Stefan Wallin wrote:
> This strikes a chord with me, I'd really like to see the possibility to
> style input fields that do not fit to be classed as required but are
> still empty to be styled differently. Today this has to be done with DOM
> scripting, neither input[value=""] or input:empty works as I think it
> should work.

This use case can already be solved like this:
input:required:invalid {
}

Assuming you are using the required attribute as specified in HTML.

Regarding the general proposal. That might be useful assuming there are
use cases different from the one above.

--
Mounir
Received on Monday, 12 March 2012 14:37:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:51 GMT