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

Re: Inclusion of :drag-over in CSS4 UI

From: Tantek Çelik <tantek@cs.stanford.edu>
Date: Fri, 23 Sep 2011 08:41:32 -0700
Message-ID: <CAOACb=K2kWw05EFvhkG=gGJQRNJDykGJY1_PNNKV07zv7WWL9A@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: David Chambers <david.chambers.05@gmail.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Ryan Seddon <seddon.ryan@gmail.com>, www-style list <www-style@w3.org>
On Thu, Sep 22, 2011 at 18:33, Ojan Vafai <ojan@chromium.org> wrote:
> On Thu, Sep 22, 2011 at 6:30 PM, David Chambers
> <david.chambers.05@gmail.com> wrote:
>> This would indeed be an excellent feature!
>> David
>> On 22 September 2011 18:20, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>> On Thu, Sep 22, 2011 at 5:18 PM, Ryan Seddon <seddon.ryan@gmail.com>
>>> wrote:
>>> > Firefox has had the :-moz-drag-over[1] pseudo-class for sometime which
>>> > allows you to style an element when the drag over event is called on
>>> > it.
>>> >
>>> > I think this would be a useful inclusion to be considered for the CSS4
>>> > UI
>>> > module, albeit perhaps with a more descriptive name.
>>> >
>>> > [1] https://developer.mozilla.org/en/CSS/:-moz-drag-over
>>> Since this actually matches an element with @dropzone (and which is a
>>> valid dropzone for the dragged element), I think it needs a better
>>> name.  As an initial bad suggestion, :valid-dropzone.
> How about just :dropzone?

This makes sense (suggestion, comments).

>>> Other than the name thing, though, this is definitely useful.  It's
>>> very useful for an author to indicate visually when the user is
>>> hovering over a valid dropzone, and without this you can only achieve
>>> that effect by adding/removing a class in the drag events (which isn't
>>> reliable, iirc, because you could, for example, drag from the element
>>> to outside the window).
> I agree. This is very useful. Would love to add this to WebKit.

That's good to hear.

Two (checkbox) choices:

1. :drop-zone - spec'd as Firefox implements
https://developer.mozilla.org/en/CSS/:-moz-drag-over - added to
*CSS3-UI*, since it sounds like a WebKit implementation would be
imminent, thus being CR-ready in short order.

2. :valid-drop-zone, :invalid-drop-zone - spec'd as a :drop-zone that
is valid/invalid per Tab's suggested text (edited), added to
*CSS4-UI*, since there are zero implementations today.
   :valid-drop-zone - a drop zone that accepts the type of data being dragged
   :invalid-drop-zone - a drop zone that doesn't accept the type of
data being dragged


I'm fine with both options (thus adding all three).

Received on Friday, 23 September 2011 15:42:50 UTC

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