W3C home > Mailing lists > Public > www-style@w3.org > June 2011

Re: [CSS4 Selectors] :matches naming bikeshed

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 16 Jun 2011 23:13:08 -0400
Message-ID: <4DFAC644.4040303@inkedblade.net>
To: www-style@w3.org
On 06/16/2011 07:58 PM, Ojan Vafai wrote:
> I think we should rename :matches to :any.
>
> 1. :matches, doesn't make clear the "or" relationship that :any does. I could
>    easily interpret :matches to mean that it matches all of the selectors
>    instead of any one of them.
> 2. Two browser vendors already ship :any (vendor prefixed of course).
> 3. :any is less typing and fewer bytes to ship down the wire.

I chose "matches" over "any" because
   1. it contrasts with :not() which is the negation of the exact same functionality
   2. it allows expansion to a full :matches() implementation, where a full :matches()
      implementation is that :matches() takes any selector (including those with
      combinators); calling it :any() implies there has to be more than one argument
      for it to be useful, which is the case now, but would not be for a full version

Basically, I think about this as
   :not(selector)
   :matches(selector)
where selector can include commas, as per usual (rather than as
   :not(selector, selector)
   :any(selector, selector)
where it can't).

Does that make sense now or still not? :)

~fantasai
Received on Friday, 17 June 2011 03:13:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:41 GMT