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

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

From: Schalk Neethling <sneethling@mozilla.com>
Date: Mon, 12 Mar 2012 07:43:26 -0700 (PDT)
To: Mounir Lamouri <mounir@lamouri.fr>
Cc: www-style@w3.org
Message-ID: <0e821953-8e2f-4b7c-8fcb-50ec8d68198c@sneethling-05169.local>

I believe what Stefan wants is to style fields that are empty, but not necessarily required, different so input:required:invalid is not going to work in this situation.


----- Original Message -----
From: "Mounir Lamouri" <mounir@lamouri.fr>
To: www-style@w3.org
Sent: Monday, March 12, 2012 4:37:19 PM
Subject: Re: [selectors4] :empty psuedo class and input fields

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.

Received on Monday, 12 March 2012 14:43:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:35:06 UTC