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

On Mon, 19 Aug 2013 19:07:25 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> On Mon, Aug 19, 2013 at 6:10 AM, Simon Pieters <simonp@opera.com> wrote:
>> FWIW, I think the other naming pattern is equally extensible in  
>> practice.
>
> Yes, both patterns can be extended indefinitely and safely.  But...
>
>> 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 intended to express something like what François said, where we can
> use the parenthetical argument to contain multiple dropzone-filtering
> keywords.
>
>     :drop(nearby valid)
>
> is shorter than
>
>     :nearby-drop:valid-drop
>
> and, in my opinion, a bit easier to read.

Ah, I didn't consider combining them. OK, that's fair enough.

> Plus, as much as we seem to prefer more "natural-seeming" names like
> ":valid-drop", many authors prefer standard "general -> specific"
> naming, as it makes things sort better and helps with autocompletion.
> ":drop(valid)" is clearer than ":drop-valid", I think, so it strikes a
> good balance between the two camps.
>
> (Also, "nearby" is a pretty useful dropzone semantic, imo.)
>
> ~TJ


-- 
Simon Pieters
Opera Software

Received on Monday, 19 August 2013 19:08:42 UTC