W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [selectors4][naming] Naming the drag-and-drop pseudo-classes

From: Simon Pieters <simonp@opera.com>
Date: Mon, 19 Aug 2013 15:10:58 +0200
To: "www-style list" <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
Message-ID: <op.w12ewkvsidj3kv@simons-macbook-pro.local>
On Fri, 16 Aug 2013 08:02:33 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> On Wed, Aug 7, 2013 at 1:51 PM, Tab Atkins Jr. <jackalmage@gmail.com>  
> wrote:
>> To help us resolve the naming issue in the Selectors spec about the
>> drag-and-drop pseudo-classes, we created a survey to help collect web
>> author responses:
>>
>> https://docs.google.com/forms/d/11Wif3cmrDtEleeED8fWMP9uKgZXdZVLkm-MOF6TUpDE/viewform
>>
>> Please fill it out if you have any opinions. ^_^
>
> It's been a week, and we've gotten nearly 800 responses, way more than
> I anticipated.  We should do this in the future!
>
> Here are the results
> <https://docs.google.com/spreadsheet/ccc?key=0AmRB4Bq4bNRBdEw4TlU5cGNTNGQ1VHF4ZFFORTFoTkE&usp=sharing>:
>
> 155 votes (20%) for :drop / :can-drop / :no-drop
> 157 votes (20%) for :active-drop / :drop / :no-drop
> 193 votes (24%) for :current-drop-target / :valid-drop-target /
> :invalid-drop-target
> 287 votes (36%) for :current-drop / :valid-drop / :invalid-drop
>
> That's a pretty clear win for the fourth set, with nearly twice the
> votes as any other set.
>
> The alternate suggestions were pretty interesting, too.  They were
> pretty varied, as might be expected from freeform input, but
> ":active-drop / :valid-drop / :invalid-drop" was the most popular,
> with roughly a quarter of all the custom suggestions.
>
> One particular custom suggestion jumped out at me as an interesting
> possibility: a :drop([active | valid | invalid]) function pseudoclass.
>  This not only puts the "drop" part first, which was called out as a
> good thing in several of the feedback entries, it also gives a natural
> extension point.

FWIW, I think the other naming pattern is equally extensible in practice.

For instance, let's say we wanted to introduce a new selector for "nearby  
drop target" (nevermind whether that's useful, just something I made up):

:nearby-drop
vs
:drop(nearby)

No problem with either of them, AFAICT.

I don't have an opinion about which naming is better, but I think the  
extensibility argument for (3) isn't really a valid argument.

> So, I suggest we make a final decision for this at next week's call,
> and choose between:
>
> 1. :current-drop / :valid-drop / :invalid-drop
> 2. :active-drop / :valid-drop / :invalid-drop
> 3. :drop(active) / :drop(valid) / :drop(invalid)
>
> ~TJ
>


-- 
Simon Pieters
Opera Software
Received on Monday, 19 August 2013 13:05:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 19 August 2013 13:05:44 UTC