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

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

From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
Date: Tue, 13 Mar 2012 07:18:18 +0800
Message-ID: <4F5E843A.7030306@csail.mit.edu>
To: WWW Style <www-style@w3.org>
(12/03/13 2:42), Christoph Päper wrote:
> Stefan Wallin:
>> My issue. I think the :empty pseudo class selector is not super 
>> intuitive when it comes to form elements such as input fields.
> Your issue, actually, is not with the ‘:empty’ pseudo-class. You 
> want a dynamic selector for the value (attribute). David Baron 
> suggested a pseudo-attribute, ‘[:value]’, for this
> <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016544.html>. 
> The CSS WG wiki <http://wiki.csswg.org/spec/selectors4> currently lists 
> the ‘::value’ pseudo-element from the UI module 
> <http://dev.w3.org/csswg/css3-ui/#pseudo-value> as an alternative, but
> that’s wrong I think, because you cannot do attribute value comparison 
> (‘=’, ‘^=’, ‘$=’, ‘*=’ …) with that.

The wiki has

dynamic values selector -
already handled by ::value pseudo-element in CSS3-UI.

. I am not quite sure what it means. '::value:empty' maybe? Would
'input::value:empty' be too long to be useful? I'll note that selectors4
has this paragraph:

  # Syntactically, a pseudo-element may be followed by any combination
  # of the user action pseudo-classes. Whether these pseudo-classes can
  # match on the pseudo-element depends on the pseudo-class and
  # pseudo-element's definition: unless otherwise-specified, none of
  # these pseudo-classes will match on the pseudo-element.

so I guess we might be able to say :empty applies to ::value. Maybe.

Received on Monday, 12 March 2012 23:18:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:13 UTC