- From: Jonas Sicking <jonas@sicking.cc>
- Date: Mon, 27 Sep 2010 10:47:19 -0700
- To: Brad Kemper <brad.kemper@gmail.com>
- Cc: Anne van Kesteren <annevk@opera.com>, Ryan Seddon <seddon.ryan@gmail.com>, Mounir Lamouri <mounir.lamouri@gmail.com>, "www-style@w3.org" <www-style@w3.org>
On Sat, Sep 25, 2010 at 8:59 AM, Brad Kemper <brad.kemper@gmail.com> wrote: > On Sep 25, 2010, at 2:12 AM, Jonas Sicking <jonas@sicking.cc> wrote: > >> On Sat, Sep 25, 2010 at 1:18 AM, Anne van Kesteren <annevk@opera.com> wrote: >>> On Fri, 24 Sep 2010 23:28:44 +0200, Jonas Sicking <jonas@sicking.cc> wrote: >>>> >>>> So to implement the current set of rules, we'd need the following >>>> three pseudo classes: >>>> >>>> :dirty >>>> Matches if user has modified value of control >>>> >>>> :has-been-invalid-and-unfocused >>>> Matches if the control was ever unfocused and invalid at the same >>>> time. Even if it later has become valid or focused >>>> >>>> :belongs-to-form-which-has-been-submitted >>>> The user has attempted to submit the <form> which is the elements .form >>> >>> I think Simon's idea was to have just one pseudo-class. I.e. either modified >>> and unfocused or in a form that has been submitted. >> >> This doesn't really change much, if anything, of my arguments >> previously in the thread though. >> >> At that point why not also add "and is invalid" to the set of >> requirements for matching this new pseduo class and make it actually >> useful in and of itself? >> >> / Jonas > > If we had :dirty, wouldn't that take care of all needs (assuming that loosing focus makes a field dirty)? Then you could just have these: > > input:dirty:valid {/* smiley face, green, etc. */} > input:dirty:invalid {/* caution sign, red, etc. */} When would the :dirty pseduo-class match? Would the above two selectors be enough to implement the UI requirements laid out in [1]? [1] http://lists.w3.org/Archives/Public/www-style/2010Sep/0722.html / Jonas
Received on Monday, 27 September 2010 17:54:00 UTC